We then override the standard Semantic UI colors like this:
/* Inject the palette into the Semantic UI theme. */
@black : @radgrad-black;
@blue : @radgrad-blue;
@brown : @radgrad-brown;
@green : @radgrad-green;
@grey : @radgrad-grey;
@lightblue : @radgrad-green-2;
@lightgreen : lighten(@radgrad-green, 5);
@olive : @radgrad-olive;
@orange : @radgrad-orange;
@pink : @radgrad-pink;
@purple : @radgrad-purple;
@red : @radgrad-red;
@teal : @radgrad-teal;
@violet : @radgrad-violet;
@white : @radgrad-white;
@yellow : @radgrad-yellow;
As a result, for any Semantic UI React component that accepts a "color" parameter, you can supply, for example, "red", and you'll get the "radgrad-red" hex color value.
Overriding the Semantic UI theme is a great first step, but we often want to use a color in a React component, and these "@radgrad-red" definitions are not available within our Meteor system.
To allow access to these colors within React Components, we make a duplicate of these definitions in the Colors.ts file. These definitions look like this:
/*
* Provide programmatic access to the colors defined in our Semantic UI Theme.
* These definitions should be in sync with those found in: