JSPM

ral-hex-converter

1.0.1
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 7
    • Score
      100M100P100Q53067F
    • License MIT

    Color converter (RAL, HEX)

    Package Exports

    • ral-hex-converter

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ral-hex-converter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Color converter (RAL, HEX)

    Convert RAL color codes to HEX codes. Data table this gist.

    Installation

    npm install --save ral-hex-converter

    Usage

    const converter = require('ral-hex-converter')
    
    const RAL_COLOR = converter.toRal(5025) // '#2A6478' ('RAL5025')
    const HEX_CODE = converter.toHex('#C35831') // 'RAL2013'  ('#C35831')
    
    const HEX_PALETTE = converter.hex // Return RAL palette in HEX codes
    const RAL_PALETTE = converter.ral // Return RAL palette in RAL colors

    Contributing

    If you found a bug, want to propose a feature or feel the urge to complain about your life, feel free to visit the issues page.