Skip to content

How can I change oklab in color-mix to use my own CSS variable? #16319

Answered by wongjn
anmoldovanov asked this question in Help
Discussion options

You must be logged in to vote

Not that I can see:

  1. The class name value is resolved here:

    let value = resolveThemeColor(candidate, theme, ['--text-color', '--color'])

  2. In the function, it resolves the color value via asColor():

    return value ? asColor(value, candidate.modifier, theme) : null

  3. In asColor(), it resolves via withAlpha():

    // Check if the modifier exists in the `opacity` theme configuration and use
    // that value if so.
    let alpha = t…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@anmoldovanov
Comment options

@wongjn
Comment options

@anmoldovanov
Comment options

@wongjn
Comment options

Answer selected by anmoldovanov
@anmoldovanov
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants