Watch
2
0
Fork
You've already forked cxbutton
0
Embossed CSS buttons
  • Java 77.9%
  • CSS 19.7%
  • HTML 2.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Mark Raynsford a799c7234f
Some checks are pending
main-RHEL10-x86_64-jdk25 / Build (push) Waiting to run
main-RHEL10-x86_64-jdk26 / Build (push) Waiting to run
main-RHEL9-x86_64-jdk25 / Build (push) Waiting to run
main-RHEL9-x86_64-jdk26 / Build (push) Waiting to run
Update workflows.
2026-07-31 18:42:50 +01:00
.forgejo Update workflows. 2026-07-31 18:42:50 +01:00
com.io7m.cxbutton.core Begin next development iteration. 2024-05-11 10:38:57 +00:00
com.io7m.cxbutton.tests Use junit BOM. 2024-10-26 13:05:18 +00:00
src/site/resources Update site metadata. 2025-08-09 15:06:39 +00:00
.gitignore Update .gitignore. 2024-05-07 16:01:40 +00:00
.gitmodules Initial version 2022-10-02 11:28:28 +00:00
checkstyle-filter.xml Stop using dixmont 2022-11-27 13:22:29 +00:00
checkstyle-suppressions-1.0.dtd Initial version 2022-10-02 11:28:28 +00:00
doc7m-books.json Add doc7m-books.json 2026-07-31 18:36:41 +01:00
pom.xml Migrate project. 2026-06-27 11:14:42 +01:00
README-CHANGES.xml Mark release 1.0.0 2024-05-11 10:38:50 +00:00
README-LICENSE.txt Update LICENSE 2023-08-13 21:16:12 +00:00
README.in Migrate project. 2026-06-27 11:14:42 +01:00
README.md Migrate project. 2026-06-27 11:14:42 +01:00

cxbutton

Maven Central Maven Central (snapshot) Java Version

com.io7m.cxbutton

cxbutton

Embossed CSS buttons.

Features

  • Templated, customizable CSS buttons.
  • OSGi ready.
  • JPMS ready.
  • ISC license.
  • High-coverage automated test suite.

Usage

Use the CxButtonCSS class to generate CSS text.

final CxButtonCSS css =
  CxButtonCSS.create();

final String text =
  css.cssOf(Optional.empty(), false, CxButtonCSS.defaultColors());

It's possible to specify custom colors, and the package can automatically derive the correct color variations for embossing:

final String text =
  css.cssOf(
    Optional.of("Ocean"),
    true,
    CxButtonCSS.colorsForScheme(
      new CxColor(1.0, 1.0, 1.0),
      new CxColor(0.0, 0.0, 0.0),
      new CxColor(0.105, 0.313, 0.454),
      0.2,
      0.2,
      0.5
    )
  );