Skip to content

Instantly share code, notes, and snippets.

View panvalkar1994's full-sized avatar
😀

Vaibhav Panvalkar panvalkar1994

😀
  • ElasticRun
  • Ratnagiri
View GitHub Profile
@EvAlex
EvAlex / color.ts
Created April 20, 2017 06:52
TypeScript Color class, useful to manipulate rgba components and convert to rga/rgba/hex
export const RGB_COLOR_REGEX = /\((\d+),\s*(\d+),\s*(\d+)(,\s*(\d*.\d*))?\)/;
export class Color {
public r: number;
public g: number;
public b: number;
public a: number;
constructor()
constructor(colorStr?: string)