Nightly Perpetrated Mischief

    @fantasy-color/luminance-for-contrast-ratio
    TypeScript icon, indicating that this package has built-in type declarations

    2.1.0 • Public • Published

    @fantasy-color/luminance-for-contrast-ratio

    Calculate the contrast ratio between two relative luminances

    type luminanceForContrastRatio = (contrastRatio: number, luminance: number) => number

    Example usage:

    import luminanceForContrastRatio from '@fantasy-color/luminance-for-contrast-ratio'
    
    luminanceForContrastRatio(3, 0.8)
    // > 0.2333333333333334

    Keywords

    none

    Install

    npm i @fantasy-color/luminance-for-contrast-ratio

    DownloadsWeekly Downloads

    0

    Version

    2.1.0

    License

    MIT

    Unpacked Size

    4.21 kB

    Total Files

    9

    Last publish

    Collaborators

    • ijigg
    • moria.am
    • atilaz
    • gideon.gur
    • irminakacz
    • fernando.3
    • xaviervia
    • psxcode
    • deepsweet