@fantasy-color/rgba-to-rgb
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

@fantasy-color/rgba-to-rgb

Transform a RGBA color object to a RGB color object.

type rgbaToRgb = (color: RGBA) => RGB

Example usage:

import rgbaToRgb from '@fantasy-color/rgba-to-rgb'

rgbaToRgb({
  red: 60,
  green: 32,
  blue: 23,
  alpha: 0.2
})
// { red: 60, green: 32, blue: 23 }

/@fantasy-color/rgba-to-rgb/

    Package Sidebar

    Install

    npm i @fantasy-color/rgba-to-rgb

    Weekly Downloads

    1

    Version

    2.1.0

    License

    MIT

    Unpacked Size

    4 kB

    Total Files

    9

    Last publish

    Collaborators

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