arcticicestudio / nord-java

An arctic, north-bluish color palette Java library.

Home Page:https://git.io/nord-java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A arctic, north-bluish color palette Java library.
Implementation of the Nord project.


Getting started

Setup

To use nord-java, it must be available on your classpath.
You can get it from the Central Repository as a dependency for your favorite build tool or download the latest version.

Apache Maven

<dependency>
  <groupId>com.arcticicestudio</groupId>
  <artifactId>nord-java</artifactId>
  <version>0.2.0</version>
</dependency>

Gradle

compile(group: 'com.arcticicestudio', name: 'nord-java', version: '0.2.0')

Apache Ivy

<dependency org="com.arcticicestudio" name="nord-java" rev="0.2.0" />

Development snapshots are available via OSS Sonatype and JFrog Artifactory.

Build

Build and install nord-java into your local repository without GPG signing:

mvn clean install

Signed artifacts may be build by using the sign-gpg profile with a provided gpg.keyname property:

mvn clean install -Dgpg.keyname=YourGPGKeyId

Continuous integration builds are running at Travis-CI and Circle CI.

Usage Guide

This is a basic guide to show the common usage of the nord-java API.
The API documentation can be found in the JavaDoc.

The class Nord is the entrypoint to the nord-java API, use it to generate the HEX and RGB color codes.

  1. Generate color code strings
  2. Obtaining the Public API version

Generate color code strings

Color code strings can be generated from all Nord enum constants by using the static methods hex(Color) and rgb(Color).
The Color object can be obtained from a Nord enum variable via the get() method.

String hex = Nord.hex(Nord.NORD0.get()); // "#2E3440"
String rgb = Nord.rgb(Nord.NORD8.get()); // "rgb(136, 192, 208)"

Obtaining the Public API version

The getVersion() method returns the ArcVer version of the public API.

String version = Nord.getVersion(); // "0.2.0"

Development

Contribution

Please report issues/bugs, feature requests and suggestions for improvements to the issue tracker.

Copyright © 2016-present Arctic Ice Studio

About

An arctic, north-bluish color palette Java library.

https://git.io/nord-java

License:MIT License


Languages

Language:Java 100.0%