Sha256: 0fb4f3b5769e23a5f1d2c2dc6d96f851c06d22004343c6981bcf4025879ae416
Contents?: true
Size: 366 Bytes
Versions: 23
Compression:
Stored size: 366 Bytes
Contents
# frozen_string_literal: true # rgb utility class Atome def rgb_html(string) ` col = w3color(#{string}); rgb_col=col.toRgb(); return Opal.hash(rgb_col) ` end def to_rgb(string) rgb_color = rgb_html(string) { red: rgb_color[:r] / 255, green: rgb_color[:g] / 255, blue: rgb_color[:b] / 255, alpha: 1 } end end
Version data entries
23 entries across 23 versions & 1 rubygems