2023-01-08 22:44:30 +00:00
2023-01-08 22:44:30 +00:00
2023-01-08 14:48:45 +00:00
2023-01-08 22:44:30 +00:00
2023-01-08 22:44:30 +00:00
2023-01-08 22:44:30 +00:00
2023-01-08 22:44:30 +00:00
2023-01-08 22:44:30 +00:00

Logo
Catppuccin for Java

Installation

Latest Version:

Be sure to replace the VERSION key below with the version shown above!

Maven

<!-- https://mvnrepository.com/artifact/com.catppuccin/catppuccin-palette -->

<dependency>
  <groupId>com.catppuccin</groupId>
  <artifactId>catppuccin-palette</artifactId>
  <version>VERSION</version>
</dependency>

Gradle

repositories {
    mavenCentral()
}

dependencies {
    // https://mvnrepository.com/artifact/com.catppuccin/catppuccin-palette
    implementation group: 'com.catppuccin', name: 'catppuccin-palette', version: 'VERSION'
}

Binaries

If you choose not to use a build tool, pre-built .jar files are available with every single release.

Usage

package com.catppuccin;

public class Main {
  public static void main(String[] args) {
    String mocha = Palette.MOCHA.getName(); // mocha
    String mochaBaseHex = Palette.MOCHA.getBase().getHex(); // 1e1e2e
    int[] mochaBaseRGB = Palette.MOCHA.getBase().getRGBComponents(); // [30, 30, 46]

    // loop through just frappé
    for (Pair<String, Color> colourPair : Palette.FRAPPE.toList()) {
      String name = colourPair.getKey();
      Color colour = colourPair.getValue();
      System.out.println(name + ": " + colour.getHex());
    }

    // loop through every colour
    for (Flavour flavour : Palette.toList()) {
      System.out.println("Flavour: " + flavour.getName());
      for (Pair<String, Color> colourPair : flavour.toList()) {
        String name = colourPair.getKey();
        Color colour = colourPair.getValue();
        System.out.println(name + ": " + colour.getHex());
      }
    }
  }
}

Contributing

If you are looking to contribute, please read through our CONTRIBUTING.md first!

Development

This project uses the build tool Maven from the java ecosystem. It is highly recommended to develop using Intellij IDEA as it will allow you to take advantage of its integration with maven tooling.

The project can be built using the command:

./mvnw clean package

and running tests is as simple as:

./mvnw test

A great 5-minute introduction to Maven can be found here.

CI / CD

This project has a GitHub actions workflow to automatically build binaries and deploy to maven central. The workflows are stored at .github/workflows

💝 Thanks to

 

Copyright © 2023-present Catppuccin Org

Description
No description provided
Readme MIT 315 KiB
Languages
Java 97.4%
Nix 2.6%