Skip to content

themischatzis/rgb-to-uicolor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rgb-to-uicolor

Convert RGB color to UIColor

Install

npm install --save rgb-to-uicolor

Usage

import {rgbToUIColor}  from 'rgb-to-uicolor';

let rgbColor = {
  r: rgbRedValue,
  g: rgbGreenValue,
  b: rgbBlueValue
}

rgbToUIColor(rgbColor);
//=> {
  r: "UIColorRedValue",
  g: "UIColorGreenValue",
  b: "UIColorBlueValue"
  }
  
  //example
  
  let rgbColor = {
  r: 199,
  g: 46,
  b: 46
}

rgbToUIColor(rgbColor);
//=> {
  r: "0.78",
  g: "0,18",
  b: "0,18"
  }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published