Sha256: ce875fc44f27b047a480970efba3836d1e87eda5fda0c2f73f480ab5eff525db
Contents?: true
Size: 791 Bytes
Versions: 3
Compression:
Stored size: 791 Bytes
Contents
#!/usr/bin/env ruby require_relative '../../lib/vedeu/models/attributes/colour_translator' values = ["00", "5f", "87", "af", "d7", "ff"] codes = {} values.each do |r| values.each do |g| values.each do |b| value = ["#", r, g, b].join trans = Vedeu::ColourTranslator.translate(value) codes[trans] = value end end end # basic 30.upto(38) do |fg| 40.upto(48) do |bg| print "\e[38;2;#{fg}m\e[48;2;#{bg}mVedeu\e[0m" end print "\n" end # foreground codes.each_slice(6) do |c| c.each do |k, v| printf "\e[48;2;49m \e[38;5;%s30m%s %3s ", k, v, k end print "\e[48;2;49m\e[38;2;39m\n" end # background codes.each_slice(6) do |c| c.each do |k, v| printf "\e[48;5;%sm \e[38;2;30m%s %3s ", k, v, k end print "\e[48;2;49m\e[38;2;39m\n" end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
vedeu-0.1.10 | test/support/colours.rb |
vedeu-0.1.9 | test/support/colours.rb |
vedeu-0.1.8 | test/support/colours.rb |