ãã¼ã¿ã®å¯è¦åãããã®ã«ã¬ã¤ã³ãã¼ã«ã©ã¼ãã£ã¼ãã§è²ã¥ããã¦ããããã§ããã¨è¦ãããã®ã§ãã¬ã¤ã³ãã¼ã«ã©ã¼ãã£ã¼ããnåå²ãã¦16é²æ°rgbè²ã³ã¼ããåºåããã³ã¼ããåå¿é²ãã¦ãã·ã§ã¢ããããªãããã å¼æ°ã¯ãã¼ã¿ç·æ°n(=åå²æ°)ãã³ã¼ãã¯ä»¥ä¸ã®éããã¾ãã¾ãªã®ã§ãã¨ã¬ã¬ã³ããªããæ¹ããã°æãã¦ãã ããã #!/usr/bin/env ruby require "rubygems" require 'paint' class Integer def color(max) h = Array.new sg = 256*6/(max)*(self) if sg >= 0 && sg <=(256*1-1) then h[0] = "ff" h[1] = ("%02x" % sg) h[2] = "00" elsif sg > (256*1-1) && sg <= (256*2-1) then
{{#tags}}- {{label}}
{{/tags}}