Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #29361
Closed
Open
Issue created Sep 03, 2019 by Administrator@rootContributor

Add contrast colors to `theme-colors.yml`

Created by: MartijnCuppens

In our docs we check for the name of the colors to apply a light or dark color:

https://github.com/twbs/bootstrap/blob/master/site/content/docs/4.3/utilities/colors.md#L33

We could add this to the theme-colors.yml file like this:

- name: primary
  hex: "#007bff"
  contrast_color: white
- name: secondary
  hex: "#868e96"
  contrast_color: white
- name: success
  hex: "#28a745"
  contrast_color: white
- name: danger
  hex: "#dc3545"
  contrast_color: white
- name: warning
  hex: "#ffc107"
  contrast_color: dark
- name: info
  hex: "#17a2b8"
  contrast_color: white
- name: light
  hex: "#f8f9fa"
  contrast_color: dark
- name: dark
  hex: "#343a40"
  contrast_color: white

This will be easier to maintain since we don't have to check for light or warning everywhere.

Assignee
Assign to
Time tracking