Skip to content
This repository has been archived by the owner on Mar 7, 2018. It is now read-only.

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
Conflicts:
	colors.lisp
  • Loading branch information
tpapp committed Jan 29, 2015
2 parents bc9b041 + 95ad9a9 commit 7d127dc
Show file tree
Hide file tree
Showing 4 changed files with 748 additions and 49 deletions.
8 changes: 3 additions & 5 deletions colors.lisp
Expand Up @@ -152,10 +152,8 @@ combination is in the positive or negative direction on the color wheel."
;;; macros used by the autogenerated files

(defmacro define-rgb-color (name red green blue)
"Macro for defining and automatically exporting color constants. Used by
the automatically generated color file."
"Macro for defining color constants. Used by the automatically generated color file."
(let ((constant-name (symbolicate #\+ name #\+)))
`(progn
(defparameter ,constant-name (rgb ,red ,green ,blue)
,(format nil "X11 color ~A." name))
(export ',constant-name))))
(define-constant ,constant-name (rgb ,red ,green ,blue)
:test #'equalp :documentation ,(format nil "X11 color ~A." name)))))
17 changes: 17 additions & 0 deletions package-template.lisp
@@ -0,0 +1,17 @@
;;; -*- Mode:Lisp; Syntax:ANSI-Common-Lisp; -*-

(in-package #:common-lisp-user)

(defpackage #:cl-colors
(:use #:alexandria
#:common-lisp
#:let-plus)
(:export
#:rgb #:rgb-red #:rgb-green #:rgb-blue #:gray #:&rgb
#:hsv #:hsv-hue #:hsv-saturation #:hsv-value #:&hsv
#:rgb-to-hsv #:hsv-to-rgb #:hex-to-rgb #:as-hsv #:as-rgb
#:rgb-combination #:hsv-combination
#:parse-hex-rgb #:print-hex-rgb

;; predefined color names
~A))

0 comments on commit 7d127dc

Please sign in to comment.