Skip to content

Commit

Permalink
Update README, labels in color demo app.
Browse files Browse the repository at this point in the history
  • Loading branch information
io7m committed May 12, 2024
1 parent 7956cdd commit 2bd3755
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 1 deletion.
24 changes: 24 additions & 0 deletions README.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

## jcolorspace

The `jcolorspace` package provides a set of functions for converting between
color spaces.

## Features

* HSV/RGB conversion functions.
* Phantom-typed color vectors for static safety.
* High coverage test suite.
* [OSGi-ready](https://www.osgi.org/)
* [JPMS-ready](https://en.wikipedia.org/wiki/Java_Platform_Module_System)
* ISC license.

## Usage

Use the `HSV` and `RGB` classes to convert between color vectors in different
color spaces.

A [demo application](com.io7m.jcolorspace.demo/src/main/java/com/io7m/jcolorspace/demo/ColorDemoMain.java)
is included that demonstrates the results of color conversions.

![ColorDemo](./src/site/resources/colorDemo.png?raw=true)
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,28 @@ jcolorspace
| OpenJDK (Temurin) LTS | Linux | [![Build (OpenJDK (Temurin) LTS, Linux)](https://img.shields.io/github/actions/workflow/status/io7m-com/jcolorspace/main.linux.temurin.lts.yml)](https://www.github.com/io7m-com/jcolorspace/actions?query=workflow%3Amain.linux.temurin.lts)|
| OpenJDK (Temurin) Current | Windows | [![Build (OpenJDK (Temurin) Current, Windows)](https://img.shields.io/github/actions/workflow/status/io7m-com/jcolorspace/main.windows.temurin.current.yml)](https://www.github.com/io7m-com/jcolorspace/actions?query=workflow%3Amain.windows.temurin.current)|
| OpenJDK (Temurin) LTS | Windows | [![Build (OpenJDK (Temurin) LTS, Windows)](https://img.shields.io/github/actions/workflow/status/io7m-com/jcolorspace/main.windows.temurin.lts.yml)](https://www.github.com/io7m-com/jcolorspace/actions?query=workflow%3Amain.windows.temurin.lts)|

## jcolorspace

The `jcolorspace` package provides a set of functions for converting between
color spaces.

## Features

* HSV/RGB conversion functions.
* Phantom-typed color vectors for static safety.
* High coverage test suite.
* [OSGi-ready](https://www.osgi.org/)
* [JPMS-ready](https://en.wikipedia.org/wiki/Java_Platform_Module_System)
* ISC license.

## Usage

Use the `HSV` and `RGB` classes to convert between color vectors in different
color spaces.

A [demo application](com.io7m.jcolorspace.demo/src/main/java/com/io7m/jcolorspace/demo/ColorDemoMain.java)
is included that demonstrates the results of color conversions.

![ColorDemo](./src/site/resources/colorDemo.png?raw=true)

Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Slider?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Region?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.Rectangle?>

<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.io7m.jcolorspace.demo.ColorDemo">
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/21.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.io7m.jcolorspace.demo.ColorDemo">
<padding>
<Insets bottom="8.0" left="16.0" right="16.0" top="8.0" />
</padding>
<children>
<HBox alignment="CENTER_LEFT" maxHeight="-Infinity" minHeight="-Infinity" prefHeight="32.0">
<children>
<Label maxWidth="-Infinity" minWidth="-Infinity" prefWidth="32.0" text="R" />
<Slider fx:id="sliderR" HBox.hgrow="ALWAYS" />
<Region maxWidth="-Infinity" minWidth="-Infinity" prefWidth="16.0" />
<TextField fx:id="fieldR" editable="false" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="24.0" prefWidth="64.0" />
</children>
</HBox>
<HBox alignment="CENTER_LEFT" layoutX="18.0" layoutY="18.0" maxHeight="-Infinity" minHeight="-Infinity" prefHeight="32.0">
<children>
<Label maxWidth="-Infinity" minWidth="-Infinity" prefWidth="32.0" text="G" />
<Slider fx:id="sliderG" HBox.hgrow="ALWAYS" />
<Region maxWidth="-Infinity" minWidth="-Infinity" prefWidth="16.0" />
<TextField fx:id="fieldG" editable="false" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="24.0" prefWidth="64.0" />
</children>
</HBox>
<HBox alignment="CENTER_LEFT" layoutX="18.0" layoutY="42.0" maxHeight="-Infinity" minHeight="-Infinity" prefHeight="32.0">
<children>
<Label maxWidth="-Infinity" minWidth="-Infinity" prefWidth="32.0" text="B" />
<Slider fx:id="sliderB" HBox.hgrow="ALWAYS" />
<Region maxWidth="-Infinity" minWidth="-Infinity" prefWidth="16.0" />
<TextField fx:id="fieldB" editable="false" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="24.0" prefWidth="64.0" />
Expand All @@ -39,20 +43,23 @@
<Region maxHeight="-Infinity" minHeight="-Infinity" prefHeight="16.0" />
<HBox alignment="CENTER_LEFT" maxHeight="-Infinity" minHeight="-Infinity" prefHeight="32.0">
<children>
<Label maxWidth="-Infinity" minWidth="-Infinity" prefWidth="32.0" text="H" />
<Slider fx:id="sliderH" HBox.hgrow="ALWAYS" />
<Region maxWidth="-Infinity" minWidth="-Infinity" prefWidth="16.0" />
<TextField fx:id="fieldH" editable="false" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="24.0" prefWidth="64.0" />
</children>
</HBox>
<HBox alignment="CENTER_LEFT" maxHeight="-Infinity" minHeight="-Infinity" prefHeight="32.0">
<children>
<Label maxWidth="-Infinity" minWidth="-Infinity" prefWidth="32.0" text="S" />
<Slider fx:id="sliderS" HBox.hgrow="ALWAYS" />
<Region maxWidth="-Infinity" minWidth="-Infinity" prefWidth="16.0" />
<TextField fx:id="fieldS" editable="false" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="24.0" prefWidth="64.0" />
</children>
</HBox>
<HBox alignment="CENTER_LEFT" maxHeight="-Infinity" minHeight="-Infinity" prefHeight="32.0">
<children>
<Label maxWidth="-Infinity" minWidth="-Infinity" prefWidth="32.0" text="V" />
<Slider fx:id="sliderV" HBox.hgrow="ALWAYS" />
<Region maxWidth="-Infinity" minWidth="-Infinity" prefWidth="16.0" />
<TextField fx:id="fieldV" editable="false" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="24.0" prefWidth="64.0" />
Expand Down
Binary file added src/site/resources/colorDemo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2bd3755

Please sign in to comment.