Clojure2d 1.4.5-SNAPSHOT
Released under the MIT
Creative coding / glitch library backed by Java2D.
Installation
To install, add the following dependency to your project or build file:
[clojure2d "1.4.5-SNAPSHOT"]
Namespaces
clojure2d.color
Color functions.
Categories
- Color conversions: color-converter colorspaces colorspaces* colorspaces-list from-CMY from-CMY* from-Cubehelix from-Cubehelix* from-DIN99 from-DIN99* from-DIN99b from-DIN99b* from-DIN99c from-DIN99c* from-DIN99d from-DIN99d* from-DIN99o from-DIN99o* from-GLHS from-GLHS* from-Gray from-Gray* from-HCL from-HCL* from-HSB from-HSB* from-HSI from-HSI* from-HSL from-HSL* from-HSV from-HSV* from-HWB from-HWB* from-HunterLAB from-HunterLAB* from-IPT from-IPT* from-IgPgTg from-IgPgTg* from-JAB from-JAB* from-JCH from-JCH* from-LAB from-LAB* from-LCH from-LCH* from-LCHuv from-LCHuv* from-LMS from-LMS* from-LUV from-LUV* from-OHTA from-OHTA* from-OSA from-OSA* from-RGB from-RGB* from-RYB* from-UCS from-UCS* from-UVW* from-XYZ from-XYZ* from-XYZ1 from-XYZ1* from-YCbCr from-YCbCr* from-YCgCo from-YCgCo* from-YDbDr from-YDbDr* from-YIQ from-YIQ* from-YPbPr from-YPbPr* from-YUV from-YUV* from-Yxy from-Yxy* from-linear from-linearRGB from-linearRGB* from-sRGB from-sRGB* to-CMY to-CMY* to-Cubehelix to-Cubehelix* to-DIN99 to-DIN99* to-DIN99b to-DIN99b* to-DIN99c to-DIN99c* to-DIN99d to-DIN99d* to-DIN99o to-DIN99o* to-GLHS to-GLHS* to-Gray to-Gray* to-HCL to-HCL* to-HSB to-HSB* to-HSI to-HSI* to-HSL to-HSL* to-HSV to-HSV* to-HWB to-HWB* to-HunterLAB to-HunterLAB* to-IPT to-IPT* to-IgPgTg to-IgPgTg* to-JAB to-JAB* to-JCH to-JCH* to-LAB to-LAB* to-LCH to-LCH* to-LCHuv to-LCHuv* to-LMS to-LMS* to-LUV to-LUV* to-OHTA to-OHTA* to-OSA to-OSA* to-Okhsv to-RGB to-RGB* to-RYB* to-UCS to-UCS* to-UVW* to-XYZ to-XYZ* to-XYZ1 to-XYZ1* to-YCbCr to-YCbCr* to-YCgCo to-YCgCo* to-YDbDr to-YDbDr* to-YIQ to-YIQ* to-YPbPr to-YPbPr* to-YUV to-YUV* to-Yxy to-Yxy* to-linear to-linearRGB to-linearRGB* to-sRGB to-sRGB*
- Distance: contrast-ratio delta-C* delta-E*-94 delta-E*-CMC delta-E-z delta-H* delta-e-cie nearest-color noticable-different?
- Gradients: correct-luma gradient gradient-cubehelix iq-gradient merge-gradients random-palette
- Interpolation: average lerp lerp- mix mixsub weighted-average
- Color/channel operations: adjust adjust-temperature alpha awt-color awt-gray blacken blue brighten ch0 ch1 ch2 clamp color darken desaturate format-hex get-channel gray green hue hue-paletton hue-polar lclamp luma modulate pack quil red relative-luma saturate scale scale-down scale-up set-alpha set-awt-alpha set-blue set-ch0 set-ch1 set-ch2 set-channel set-green set-red to-awt-color to-color whiten
- Colors, palettes: correct-luma named-colors-list palette paletton paletton-presets-list possible-color? possible-palette? random-color random-gradient reduce-colors resample temperature tinter valid-color?
Other vars: ->OSAFDF achromatomaly achromatopsia apply-theme black? brightness color-themes complementary contrast delta-C-RGB delta-D-HCL delta-E* delta-E*-2000 delta-E*-euclidean delta-E-HyAB delta-c delta-e-cmc delta-e-jab delta-h deuteranomaly deuteranopia exposure fe-color-matrix find-gradient find-palette from-Okhsl from-Okhsl* from-Okhsv from-Okhsv* from-Okhwb from-Okhwb* from-Oklab from-Oklab* from-Oklch from-Oklch* from-PalettonHSV from-PalettonHSV* from-RYB from-UVW from-XYB from-XYB* from-luma-color-hue grayscale hue-rotate lerp+ make-LCH mixbox negate not-black? protanomaly protanopia saturation sepia temperature-names thing-presets-list to-Okhsl to-Okhsl* to-Okhsv* to-Okhwb to-Okhwb* to-Oklab to-Oklab* to-Oklch to-Oklch* to-PalettonHSV to-PalettonHSV* to-RYB to-UVW to-XYB to-XYB* to-luma-color-hue tritanomaly tritanopia wavelength
clojure2d.color.blend
Blending modes functions for colors, gradients and palettes.
Categories
Other vars: add alpha-blending and average blend-colors blend-gradients blend-palettes blends blends-list burn ch0 ch1 ch2 color darken difference divide dodge exclusion freeze glow hardlight hardmix heat hue inverseburn inversedodge lighten linearburn linearlight luminocity madd mburn mdivide mdodge mfreeze mglow mheat minverseburn minversedodge mlinearburn mlinearlight mreflect msoftburn msoftdodge mstamp msubtract multiply mvividlight negation normal or overlay pegtoplight pinlight reflect saturation screen softburn softdodge softlight stamp subtract vividlight xor
clojure2d.color.cssgram
Reimplementation of selection of instagram color filters.
clojure2d.color.whitepoints
Categories
Other vars: XZ->xy chromatic-adaptation-methods illuminants rgbs tristimulus uv->xy xy->XZ xy->uv
clojure2d.core
Main Clojure2d entry point for Canvas, Window and drawing generatively.
Categories
- Canvas functions: black-canvas canvas clip convolve flip-x flip-y get-canvas get-image height inv-transform orient-canvas orientations-list pop-matrix push-matrix rendering-hints replace-canvas reset-clip reset-matrix resize rotate save scale shear subimage to-image transform translate width with-canvas with-canvas-> with-oriented-canvas with-oriented-canvas->
- Screen: screen-height screen-width
- Drawing functions: arc awt-xor-mode bezier crect curve ellipse filled-with-stroke flat-hex gradient-mode grid-cell grid-qr-cell image line paint-mode path path-bezier pattern-mode point pointy-hex prect quad rarc rect set-awt-background set-awt-color set-background set-color set-composite set-stroke set-stroke-custom shape stroke-caps stroke-joins transcode-svg triangle triangle-fan triangle-strip xor-mode
- Date / time: datetime day hour millis minute month nanos sec year
- Events: alt-down? alt-gr-down? control-down? key-char key-code key-event key-event-map key-pressed key-pressed? key-raw key-released key-typed meta-down? mouse-button mouse-event mouse-event-map mouse-pos mouse-pressed? mouse-x mouse-y shift-down?
- Image functions: *jpeg-image-quality* convolution-matrices convolve file-extension get-image height img-reader-formats img-writer-formats load-image load-svg resize save save-file-type save-image subimage to-image width
- Session: *log-to-file* close-session ensure-session log log-name make-session next-filename session-name
- Transform canvas: flip-x flip-y inv-transform orient-canvas orientations-list pop-matrix push-matrix reset-matrix rotate scale shear transform translate with-oriented-canvas with-oriented-canvas->
- Window: alt-down? alt-gr-down? close-window control-down? convolve get-canvas get-image get-state height key-char key-code key-pressed? key-raw meta-down? mouse-button mouse-in-window? mouse-pos mouse-pressed? mouse-x mouse-y rendering-hints replace-canvas save set-state! shift-down? show-window subimage to-image width window-active?
- Text / font: char-width font-ascent font-height fonts-list load-font set-font set-font-attributes text text-bounding-box text-shape text-width
Other vars: ->Canvas ->SessionType ->Window ->WithExceptionT arc-shape bezier-shape bounding-box contains-point? contains-rectangle? crect-shape curve-shape double-array-2d ellipse-shape flat-hex-shape flush-graphics grid-cell-shape int-array-2d intersects-rectangle? load-bytes load-url-image long-array-2d make-counter make-graphics map->Canvas map->SessionType map->Window path-bezier-shape path-def->shape path-shape pointy-hex-shape prect-shape quad-shape rarc-shape rect-shape repaint shape->path-def to-hex triangle-shape
clojure2d.extra.glitch
Various glitching pixel filters or functions
clojure2d.extra.overlays
Categories
Other vars: noise-overlay render-crt-scanlines render-noise render-rgb-scanlines render-spots spots-overlay
clojure2d.extra.raymarching
(ABANDONED) Raymarching helper.
clojure2d.extra.signal
Image pixels as signal
Categories
- Effects: apply-effects-to-pixels effects-filter
- Signal: pixels->signal signal->pixels
clojure2d.extra.utils
Set of various utilities which can be used to display various objects.
Categories
Other vars: color->image gradient->image palette->image show-color show-gradient show-image show-palette show-scalar-field show-vector-field
clojure2d.pixels
Operations on pixel levels.
Categories
- Filters: blend-channel blend-channel-xy blend-channels box-blur box-blur-1 box-blur-2 box-blur-3 box-blur-5 brightness-contrast compose-channels composite dilate dilate-cross equalize erode erode-cross filter-channel filter-channel-xy filter-channels filter-colors filter-colors-xy gaussian-blur gaussian-blur-1 gaussian-blur-2 gaussian-blur-3 gaussian-blur-5 horizontal-blur horizontal-blur-1 horizontal-blur-2 horizontal-blur-3 horizontal-blur-5 median modulate negate normalize posterize posterize-16 posterize-4 posterize-8 quantile-1 quantile-2 quantile-3 quantile-5 quantile-6 quantile-7 solarize threshold threshold-25 threshold-50 threshold-75 tint vertical-blur vertical-blur-1 vertical-blur-2 vertical-blur-3 vertical-blur-5
- Log density renderer: add-pixel! get-color get-pixel gradient-renderer merge-gradient-renderers merge-renderers renderer set-color! to-pixels
- Pixels: *pixels-edge* clone-pixels get-channel get-color get-value load-pixels pixels set-canvas-pixels! set-channel! set-color! set-image-pixels! set-value! to-pixels
Other vars: ->GradientRenderer ->LDRenderer ->Pixels map->GradientRenderer map->LDRenderer set-renderer-scaling-factor!
clojure2d.protocols
Categories
- events: key-pressed? mouse-pressed?
- window: key-pressed? mouse-pressed?
Other vars: add-pixel! alpha alt-down? alt-gr-down? blue bounding-box contains-point? contains-rectangle? control-down? convolve get-channel get-color get-image get-pixel get-value green height intersects-rectangle? key-char key-code key-raw luma meta-down? mouse-button mouse-pos mouse-x mouse-y red resize save set-channel! set-color! set-value! shift-down? subimage to-awt-color to-color to-pixels width