You can define a separate js file colors.js, that consists of the colors object and export it.
export const COLORS = {
white: '#fff',
black: '#000',
// your colors
}
Now import COLORS from the above file – import {COLORS} from './<Path>/colors.js' in your respective file that uses the defined colors. And use it as shown below.
button: {
color: COLORS.white,
backgroundColor: COLORS.black
}