Closed philipnye closed 2 months ago
This is in two parts, the first of which is relatively simple, and the second is a bit more complex...
I've added an additional property to the timeline component called contrastClip
, which defaults to 165. Setting this clip lower will tend to make the text remain coloured as the contrast decreases. It was originally set to 250. You can now override this per chart, although bear in mind that setting this lower will make the charts less accessible.
The selection of white or grey as a contrast for overlays is a bit more involved. Basically, we can set the contrastColour
for any category by editing the categoryColours.js
. By default, these are set by finding the highest contrast between grey and white. I have overridden these for the MoS and Other Parl Role cases, but these are on a case by case basis. These are inherently less accessible than the default. Granted, this might be minimal.
@gilesdring This sounds the right handling for these two things. When pushed to live we can double-check there aren't any unwanted consequences.
Don't seem to be any unwanted consequences - happy for this to be marked as closed.
I'll admit to losing track a little of how the controls for contrast colours worked - let us know if making these changes are within our control.