Module awt-color-factory

The awt-color-factory artifact

Лицензия

Лицензия

Группа

Группа

org.beryx
Идентификатор

Идентификатор

awt-color-factory
Последняя версия

Последняя версия

1.0.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

Module awt-color-factory
The awt-color-factory artifact
Ссылка на сайт

Ссылка на сайт

https://github.com/beryx/awt-color-factory
Система контроля версий

Система контроля версий

https://github.com/beryx/awt-color-factory

Скачать awt-color-factory

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.beryx/awt-color-factory/ -->
<dependency>
    <groupId>org.beryx</groupId>
    <artifactId>awt-color-factory</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.beryx/awt-color-factory/
implementation 'org.beryx:awt-color-factory:1.0.2'
// https://jarcasting.com/artifacts/org.beryx/awt-color-factory/
implementation ("org.beryx:awt-color-factory:1.0.2")
'org.beryx:awt-color-factory:jar:1.0.2'
<dependency org="org.beryx" name="awt-color-factory" rev="1.0.2">
  <artifact name="awt-color-factory" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.beryx', module='awt-color-factory', version='1.0.2')
)
libraryDependencies += "org.beryx" % "awt-color-factory" % "1.0.2"
[org.beryx/awt-color-factory "1.0.2"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

PRs Welcome License Build Status Javadocs

AWT Color Factory

💡 You can use this library regardless of the license under which your software is distributed.

In JavaFX you can easily create a javafx.scene.paint.Color object from a string representation such as "lightblue", "#aa38e0", or "0x40A8CC" by using Color.web(String colorString), Color.web(String colorString, double opacity), or Color.valueOf(String value).

This one-class project provides equivalent methods for creating java.awt.Color objects.

Example usage

Color c1 = ColorFactory.valueOf("firebrick");
Color c2 = ColorFactory.valueOf("#aa38e0");
Color c3 = ColorFactory.valueOf("0x40A8CC");
Color c4 = ColorFactory.valueOf("rgba(112,36,228,0.9)");
Color c5 = ColorFactory.web("forestgreen", 0.7);
Color c6 = ColorFactory.web("hsl(270,90%,70%)", 0.8);

See the javadoc for more details.

Why should you use this library? Can't you just call the JavaFX methods and convert the returned javafx.scene.paint.Color into a java.awt.Color? Of course you can. But you may find this little library useful if you don't want your code to depend on JavaFX. And remember, starting with JDK 11, JavaFX is no longer part of the JDK.

AWT Color Factory is available in JCenter and Maven Central.

Maven

<dependency>
    <groupId>org.beryx</groupId>
    <artifactId>awt-color-factory</artifactId>
    <version>1.0.1</version>
</dependency>

Gradle

compile 'org.beryx:awt-color-factory:1.0.1'

AWT Color Factory contains code that is almost identical to that found in javafx.scene.paint.Color, therefore the library is distributed under the same license as OpenJFX: the GPL 2 with Classpath exception. The Classpath exception clause gives you permission to include this library in your executable code, regardless of the license under which your software is distributed.

This library requires Java 7 or newer. The jar artifact is modularized under the name org.beryx.awt.color.

org.beryx

Beryx

Версии библиотеки

Версия
1.0.2
1.0.1
1.0.0