Skip to content

Latest commit

 

History

History

rgb-to-rgba

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

@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 }