0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

RGB文字列を数値に変換

Posted at
rgb-string-to-value.el
(defun rgb-string-to-values (val)
  (interactive)
  (format " %d %d %d"
          (string-to-number  (substring val 0 2) 16)
          (string-to-number  (substring val 2 4) 16)
          (string-to-number  (substring val 4 6) 16)
          ))

; test
(rgb-string-to-values "ffffff")
(rgb-string-to-values "007ab7")
(rgb-string-to-values "cbe6f3")
(rgb-string-to-values "a4c520")
(rgb-string-to-values "eef5d3")
(rgb-string-to-values "da5019")
(rgb-string-to-values "f9dfd5")
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?