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

2.1.0 • Public • Published

@fantasy-color/rgb-to-rgba

Transform a RGB color object to a RGBA color object.

type rgbToRgba = (color: RGB) => RGBA

Example usage:

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

rgbToRgba({
  red: 60,
  green: 32,
  blue: 23
})
// { red: 60, green: 32, blue: 23, alpha: 1 }

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

    Package Sidebar

    Install

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

    Weekly Downloads

    1

    Version

    2.1.0

    License

    MIT

    Unpacked Size

    4.13 kB

    Total Files

    9

    Last publish

    Collaborators

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