Skip to main content

Example page

This example page imports the React component ColorGenerator.

You can use it to create generate a color set for your site.

tip

To ensure readability, aim for at least WCAG-AA contrast ratio for the primary color. Use the DocStatic website itself to preview how your color palette will appear. You can use alternative palettes in dark mode because one color doesn't usually work in both light and dark mode.

CSS Variable NameHexAdjustmentContrast Rating
--ifm-color-primary-lightest#007aefFail πŸ”΄
--ifm-color-primary-lighter#006cd4AA πŸ‘
--ifm-color-primary-light#0067caAA πŸ‘
--ifm-color-primary#005eb80AA πŸ‘
--ifm-color-primary-dark#0055a6AAA πŸ…
--ifm-color-primary-darker#00509cAAA πŸ…
--ifm-color-primary-darkest#004281AAA πŸ…

Replace the variables in src/css/custom.css with these new variables.

/src/css/custom.css
:root {
--ifm-color-primary: #005eb8;
--ifm-color-primary-dark: #0055a6;
--ifm-color-primary-darker: #00509c;
--ifm-color-primary-darkest: #004281;
--ifm-color-primary-light: #0067ca;
--ifm-color-primary-lighter: #006cd4;
--ifm-color-primary-lightest: #007aef;
}