├── .github └── workflows │ └── ci.yml ├── .gitignore ├── LICENSE ├── README.md ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle └── src └── main └── java ├── eu └── hansolo │ └── colors │ ├── ColorHelper.java │ ├── Demo.java │ ├── FlatColorUiPicker.java │ ├── FlatColorsUi.java │ ├── FlatUi.java │ ├── FlatUiColorPicker.java │ ├── IColor.java │ ├── MaterialDesign.java │ ├── MaterialDesignColorPicker.java │ ├── Metro.java │ └── Social.java └── module-info.java /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Java CI 3 | 4 | on: [push] 5 | 6 | jobs: 7 | test: 8 | runs-on: ${{ matrix.os }} 9 | strategy: 10 | matrix: 11 | os: [ubuntu-latest, macOS-latest, windows-latest] 12 | java: [21.0.1] 13 | fail-fast: false 14 | max-parallel: 4 15 | name: Test JDK ${{ matrix.java }}, ${{ matrix.os }} 16 | 17 | steps: 18 | - uses: actions/checkout@v3 19 | - name: Set up JDK ${{ matrix.java }} 20 | uses: actions/setup-java@v3 21 | with: 22 | java-version: ${{ matrix.java }} 23 | distribution: 'zulu' 24 | - name: Import GPG Key 25 | id: import_gpg 26 | uses: crazy-max/ghaction-import-gpg@v5 27 | with: 28 | gpg_private_key: ${{ secrets.GPG_KEY }} 29 | passphrase: ${{ secrets.GPG_PASSPHRASE }} 30 | env: 31 | GPG_PRIVATE_KEY: ${{ secrets.GPG_KEY }} 32 | PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} 33 | - name: Build with Gradle 34 | run: ./gradlew clean build 35 | env: 36 | OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} 37 | OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} 38 | GH_USER: ${{ secrets.GH_USER }} 39 | GH_TOKEN: ${{ secrets.GH_TOKEN }} 40 | GPG_PRIVATE_KEY: ${{ secrets.GPG_KEY }} 41 | PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} 42 | - name: Upload artifact 43 | uses: actions/upload-artifact@v3 44 | with: 45 | name: Colors-${{ matrix.os }} 46 | path: ./build/libs/** 47 | - name: Verify jlink 48 | run: ./gradlew jlink 49 | env: 50 | OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} 51 | OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} 52 | GH_USER: ${{ secrets.GH_USER }} 53 | GH_TOKEN: ${{ secrets.GH_TOKEN }} 54 | GPG_PRIVATE_KEY: ${{ secrets.GPG_KEY }} 55 | PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} 56 | ... 57 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | colors.iml 3 | build 4 | logos 5 | cache.properties.lock 6 | fileHashes.bin 7 | fileSnapshots.bin 8 | outputFileStates.bin 9 | taskArtifacts.bin 10 | otherResources 11 | ._* 12 | .gradle 13 | .DS_Store 14 | /out 15 | /.nb-gradle/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Colors 2 | A little project that simply contains some popular color definitions. 3 | It contains the Material Design colors and the Flat UI colors. 4 | You will find two classes with the color definitions and 5 | for each color definition class there is a JavaFX color picker app 6 | that shows you the colors and copy the clicked color to the clipboard. 7 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | import groovy.json.JsonOutput 2 | import groovy.json.JsonSlurper 3 | 4 | import java.text.SimpleDateFormat 5 | 6 | plugins { 7 | id 'idea' 8 | id 'java-library' 9 | id 'maven-publish' 10 | id 'signing' 11 | id 'com.google.osdetector' version '1.7.3' 12 | id 'org.javamodularity.moduleplugin' version '1.8.12' 13 | id 'org.beryx.jlink' version '3.0.1' 14 | id 'net.nemerosa.versioning' version '3.0.0' 15 | } 16 | 17 | apply plugin: 'maven-publish' 18 | apply plugin: 'signing' 19 | 20 | description = 'A JavaFX library that contains different color sets' 21 | mainClassName = "$moduleName/eu.hansolo.colors.Demo" 22 | 23 | Date buildTimeAndDate = new Date() 24 | ext { 25 | moduleName = 'eu.hansolo.colors' 26 | buildDate = new SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate) 27 | buildTime = new SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate) 28 | platform = osdetector.os == 'osx' ? osdetector.arch == 'aarch_64' ? 'mac-aarch64' : 'mac' : osdetector.os == 'windows' ? 'win' : osdetector.os == 'linux' ? osdetector.arch == 'aarch_64' ? 'linux-aarch64' : 'linux' : osdetector.os 29 | ciOssrhUsername = System.getenv('OSSRH_USERNAME') 30 | ciOssrhPassword = System.getenv('OSSRH_PASSWORD') 31 | ciGHUser = System.getenv('GH_USER') 32 | ciGHToken = System.getenv('GH_TOKEN') 33 | gpgkey = System.getenv("GPG_PRIVATE_KEY") 34 | gpgpassphrase = System.getenv("PASSPHRASE") 35 | } 36 | 37 | repositories { 38 | mavenCentral() 39 | } 40 | 41 | dependencies { 42 | implementation "org.openjfx:javafx-base:${javafxVersion}:${platform}" 43 | implementation "org.openjfx:javafx-graphics:${javafxVersion}:${platform}" 44 | implementation "org.openjfx:javafx-controls:${javafxVersion}:${platform}" 45 | } 46 | 47 | application { 48 | mainModule = moduleName 49 | } 50 | 51 | java { 52 | // Set to false per https://github.com/java9-modularity/gradle-modules-plugin 53 | modularity.inferModulePath.set(false) 54 | } 55 | 56 | jar { 57 | from { 58 | //duplicatesStrategy = DuplicatesStrategy.EXCLUDE 59 | //configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } 60 | } { 61 | exclude "META-INF/*.SF" 62 | exclude "META-INF/*.DSA" 63 | exclude "META-INF/*.RSA" 64 | } 65 | manifest { 66 | attributes( 67 | 'Built-By' : System.properties['user.name'], 68 | 'Created-By' : System.properties['java.version'] + " (" + System.properties['java.vendor'] + " " + System.properties['java.vm.version'] + ")", 69 | 'Build-Date' : project.buildDate, 70 | 'Build-Time' : project.buildTime, 71 | 'Build-Revision' : versioning.info.commit, 72 | 'Specification-Title' : project.name, 73 | 'Specification-Version' : project.version, 74 | 'Implementation-Title' : project.name, 75 | 'Implementation-Version': project.version, 76 | 'Bundle-Name' : project.name, 77 | 'Bundle-License' : 'https://www.apache.org/licenses/LICENSE-2.0;description=Apache License Version 2.0;link=https://spdx.org/licenses/Apache-2.0.html', 78 | 'Bundle-Description' : project.description, 79 | 'Bundle-SymbolicName' : 'eu.hansolo.colors', 80 | 'Export-Package' : 'eu.hansolo.colors', 81 | 'Class-Path' : "${project.name}-${project.version}.jar", 82 | 'Main-Class' : application.mainClass 83 | ) 84 | } 85 | } 86 | 87 | 88 | // create one jar for the javadoc 89 | task javadocJar(type: Jar, dependsOn: javadoc) { 90 | archiveClassifier = 'javadoc' 91 | from javadoc.destinationDir 92 | } 93 | 94 | // create one jar for the source files 95 | task sourcesJar(type: Jar, dependsOn: classes) { 96 | archiveClassifier = 'sources' 97 | from sourceSets.main.allSource 98 | } 99 | 100 | artifacts { 101 | archives jar 102 | archives javadocJar 103 | archives sourcesJar 104 | } 105 | 106 | signing { 107 | if (gpgkey && gpgpassphrase) { 108 | useInMemoryPgpKeys(gpgkey, gpgpassphrase) 109 | } 110 | 111 | sign configurations.archives 112 | sign publishing.publications 113 | } 114 | 115 | // Remove 'thirdPartyCompatibility' from JavaFX runtimeElements variant 116 | // Otherwise it locks Gradle Module Metadata (GMM) to the publishing OS 117 | tasks.withType(GenerateModuleMetadata).configureEach { 118 | doLast { _ -> 119 | def gmmFile = it.outputFile.get().asFile 120 | def inJson = new JsonSlurper().parseText(gmmFile.text) 121 | def filteredVariant = inJson.variants.findAll { it.name == configurations.runtimeElements.name } 122 | // remove "thirdPartyCompatibility" from GMM 123 | filteredVariant.dependencies.first().each { 124 | if (it.group == 'org.openjfx') { 125 | it.remove('thirdPartyCompatibility') 126 | } 127 | } 128 | def outJson = JsonOutput.toJson(inJson) 129 | gmmFile.write(JsonOutput.prettyPrint(outJson)) 130 | } 131 | } 132 | 133 | publishing { 134 | publications { 135 | mavenCustom(MavenPublication) { 136 | group = 'eu.hansolo' 137 | artifactId = 'colors' 138 | version = "${version}" 139 | 140 | from components.java 141 | artifact sourcesJar 142 | artifact javadocJar 143 | 144 | pom.withXml { 145 | asNode().dependencies.'*'.findAll { 146 | it.groupId.text() == 'org.openjfx' 147 | }.each { 148 | it.remove(it.classifier) 149 | } 150 | } 151 | 152 | pom { 153 | name = 'Heatmap' 154 | description = 'A JavaFX library that contains different color sets' 155 | url = "https://github.com/HanSolo/heatmap/wiki" 156 | licenses { 157 | license { 158 | name = "The Apache License, Version 2.0" 159 | url = "http://www.apache.org/licenses/LICENSE-2.0.txt" 160 | } 161 | } 162 | developers { 163 | developer { 164 | id = "HanSolo" 165 | name = "Gerrit Grunwald" 166 | email = "han.solo@mac.com" 167 | } 168 | } 169 | scm { 170 | connection = "scm:git:https://HanSolo/Colors" 171 | developerConnection = "scm:git:https://HanSolo/Colors" 172 | url = "https://github.com/HanSolo/Colors" 173 | } 174 | } 175 | } 176 | } 177 | 178 | repositories { 179 | maven { 180 | name = "OSSRH" 181 | url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2' 182 | credentials { 183 | username = null == ciOssrhUsername ? ossrhUsername : ciOssrhUsername 184 | password = null == ciOssrhPassword ? ossrhPassword : ciOssrhPassword 185 | } 186 | } 187 | maven { 188 | name = "GitHubPackages" 189 | url = "https://maven.pkg.github.com/HanSolo/Colors" 190 | credentials { 191 | username = null == ciGHUser ? ghUser : ciGHUser 192 | password = null == ciGHToken ? ghToken : ciGHToken 193 | } 194 | } 195 | } 196 | } 197 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed under the Apache License, Version 2.0 (the "License"); 3 | # you may not use this file except in compliance with the License. 4 | # You may obtain a copy of the License at 5 | # 6 | # http://www.apache.org/licenses/LICENSE-2.0 7 | # 8 | # Unless required by applicable law or agreed to in writing, software 9 | # distributed under the License is distributed on an "AS IS" BASIS, 10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | # See the License for the specific language governing permissions and 12 | # limitations under the License. 13 | # 14 | 15 | sourceCompatibility = 21 16 | targetCompatibility = 21 17 | 18 | group = eu.hansolo 19 | version = 21.0.0 20 | javafxVersion = 21.0.1 21 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HanSolo/Colors/a2b6d469c7f903ef8e8a7d3c7ddcd1e279d29017/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Dec 17 09:21:18 CET 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | 8 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | # 21 | # Gradle start up script for POSIX generated by Gradle. 22 | # 23 | # Important for running: 24 | # 25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 26 | # noncompliant, but you have some other compliant shell such as ksh or 27 | # bash, then to run this script, type that shell name before the whole 28 | # command line, like: 29 | # 30 | # ksh Gradle 31 | # 32 | # Busybox and similar reduced shells will NOT work, because this script 33 | # requires all of these POSIX shell features: 34 | # * functions; 35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 37 | # * compound commands having a testable exit status, especially «case»; 38 | # * various built-in commands including «command», «set», and «ulimit». 39 | # 40 | # Important for patching: 41 | # 42 | # (2) This script targets any POSIX shell, so it avoids extensions provided 43 | # by Bash, Ksh, etc; in particular arrays are avoided. 44 | # 45 | # The "traditional" practice of packing multiple parameters into a 46 | # space-separated string is a well documented source of bugs and security 47 | # problems, so this is (mostly) avoided, by progressively accumulating 48 | # options in "$@", and eventually passing that to Java. 49 | # 50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 52 | # see the in-line comments for details. 53 | # 54 | # There are tweaks for specific operating systems such as AIX, CygWin, 55 | # Darwin, MinGW, and NonStop. 56 | # 57 | # (3) This script is generated from the Groovy template 58 | # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 59 | # within the Gradle project. 60 | # 61 | # You can find Gradle at https://github.com/gradle/gradle/. 62 | # 63 | ############################################################################## 64 | 65 | # Attempt to set APP_HOME 66 | 67 | # Resolve links: $0 may be a link 68 | app_path=$0 69 | 70 | # Need this for daisy-chained symlinks. 71 | while 72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 73 | [ -h "$app_path" ] 74 | do 75 | ls=$( ls -ld "$app_path" ) 76 | link=${ls#*' -> '} 77 | case $link in #( 78 | /*) app_path=$link ;; #( 79 | *) app_path=$APP_HOME$link ;; 80 | esac 81 | done 82 | 83 | # This is normally unused 84 | # shellcheck disable=SC2034 85 | APP_BASE_NAME=${0##*/} 86 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit 87 | 88 | # Use the maximum available, or set MAX_FD != -1 to use that value. 89 | MAX_FD=maximum 90 | 91 | warn () { 92 | echo "$*" 93 | } >&2 94 | 95 | die () { 96 | echo 97 | echo "$*" 98 | echo 99 | exit 1 100 | } >&2 101 | 102 | # OS specific support (must be 'true' or 'false'). 103 | cygwin=false 104 | msys=false 105 | darwin=false 106 | nonstop=false 107 | case "$( uname )" in #( 108 | CYGWIN* ) cygwin=true ;; #( 109 | Darwin* ) darwin=true ;; #( 110 | MSYS* | MINGW* ) msys=true ;; #( 111 | NONSTOP* ) nonstop=true ;; 112 | esac 113 | 114 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 115 | 116 | 117 | # Determine the Java command to use to start the JVM. 118 | if [ -n "$JAVA_HOME" ] ; then 119 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 120 | # IBM's JDK on AIX uses strange locations for the executables 121 | JAVACMD=$JAVA_HOME/jre/sh/java 122 | else 123 | JAVACMD=$JAVA_HOME/bin/java 124 | fi 125 | if [ ! -x "$JAVACMD" ] ; then 126 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 127 | 128 | Please set the JAVA_HOME variable in your environment to match the 129 | location of your Java installation." 130 | fi 131 | else 132 | JAVACMD=java 133 | if ! command -v java >/dev/null 2>&1 134 | then 135 | die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 136 | 137 | Please set the JAVA_HOME variable in your environment to match the 138 | location of your Java installation." 139 | fi 140 | fi 141 | 142 | # Increase the maximum file descriptors if we can. 143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 144 | case $MAX_FD in #( 145 | max*) 146 | # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. 147 | # shellcheck disable=SC3045 148 | MAX_FD=$( ulimit -H -n ) || 149 | warn "Could not query maximum file descriptor limit" 150 | esac 151 | case $MAX_FD in #( 152 | '' | soft) :;; #( 153 | *) 154 | # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. 155 | # shellcheck disable=SC3045 156 | ulimit -n "$MAX_FD" || 157 | warn "Could not set maximum file descriptor limit to $MAX_FD" 158 | esac 159 | fi 160 | 161 | # Collect all arguments for the java command, stacking in reverse order: 162 | # * args from the command line 163 | # * the main class name 164 | # * -classpath 165 | # * -D...appname settings 166 | # * --module-path (only if needed) 167 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 168 | 169 | # For Cygwin or MSYS, switch paths to Windows format before running java 170 | if "$cygwin" || "$msys" ; then 171 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 172 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 173 | 174 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 175 | 176 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 177 | for arg do 178 | if 179 | case $arg in #( 180 | -*) false ;; # don't mess with options #( 181 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 182 | [ -e "$t" ] ;; #( 183 | *) false ;; 184 | esac 185 | then 186 | arg=$( cygpath --path --ignore --mixed "$arg" ) 187 | fi 188 | # Roll the args list around exactly as many times as the number of 189 | # args, so each arg winds up back in the position where it started, but 190 | # possibly modified. 191 | # 192 | # NB: a `for` loop captures its iteration list before it begins, so 193 | # changing the positional parameters here affects neither the number of 194 | # iterations, nor the values presented in `arg`. 195 | shift # remove old arg 196 | set -- "$@" "$arg" # push replacement arg 197 | done 198 | fi 199 | 200 | 201 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 202 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 203 | 204 | # Collect all arguments for the java command; 205 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of 206 | # shell script including quotes and variable substitutions, so put them in 207 | # double quotes to make sure that they get re-expanded; and 208 | # * put everything else in single quotes, so that it's not re-expanded. 209 | 210 | set -- \ 211 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 212 | -classpath "$CLASSPATH" \ 213 | org.gradle.wrapper.GradleWrapperMain \ 214 | "$@" 215 | 216 | # Stop when "xargs" is not available. 217 | if ! command -v xargs >/dev/null 2>&1 218 | then 219 | die "xargs is not available" 220 | fi 221 | 222 | # Use "xargs" to parse quoted args. 223 | # 224 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 225 | # 226 | # In Bash we could simply go: 227 | # 228 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 229 | # set -- "${ARGS[@]}" "$@" 230 | # 231 | # but POSIX shell has neither arrays nor command substitution, so instead we 232 | # post-process each arg (as a line of input to sed) to backslash-escape any 233 | # character that might be a shell metacharacter, then use eval to reverse 234 | # that process (while maintaining the separation between arguments), and wrap 235 | # the whole thing up as a single "set" statement. 236 | # 237 | # This will of course break if any of these variables contains a newline or 238 | # an unmatched quote. 239 | # 240 | 241 | eval "set -- $( 242 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 243 | xargs -n1 | 244 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 245 | tr '\n' ' ' 246 | )" '"$@"' 247 | 248 | exec "$JAVACMD" "$@" 249 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%"=="" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%"=="" set DIRNAME=. 29 | @rem This is normally unused 30 | set APP_BASE_NAME=%~n0 31 | set APP_HOME=%DIRNAME% 32 | 33 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 34 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 35 | 36 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 37 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 38 | 39 | @rem Find java.exe 40 | if defined JAVA_HOME goto findJavaFromJavaHome 41 | 42 | set JAVA_EXE=java.exe 43 | %JAVA_EXE% -version >NUL 2>&1 44 | if %ERRORLEVEL% equ 0 goto execute 45 | 46 | echo. 47 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 48 | echo. 49 | echo Please set the JAVA_HOME variable in your environment to match the 50 | echo location of your Java installation. 51 | 52 | goto fail 53 | 54 | :findJavaFromJavaHome 55 | set JAVA_HOME=%JAVA_HOME:"=% 56 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 57 | 58 | if exist "%JAVA_EXE%" goto execute 59 | 60 | echo. 61 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 62 | echo. 63 | echo Please set the JAVA_HOME variable in your environment to match the 64 | echo location of your Java installation. 65 | 66 | goto fail 67 | 68 | :execute 69 | @rem Setup the command line 70 | 71 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 72 | 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if %ERRORLEVEL% equ 0 goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | set EXIT_CODE=%ERRORLEVEL% 85 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 86 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 87 | exit /b %EXIT_CODE% 88 | 89 | :mainEnd 90 | if "%OS%"=="Windows_NT" endlocal 91 | 92 | :omega 93 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'colors' 2 | 3 | -------------------------------------------------------------------------------- /src/main/java/eu/hansolo/colors/ColorHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 by Gerrit Grunwald 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package eu.hansolo.colors; 17 | 18 | import javafx.scene.paint.Color; 19 | 20 | /** 21 | * 22 | * Created by Naoghuman on 12.01.16. 23 | */ 24 | public class ColorHelper { 25 | public static String rgb(final Color COLOR) { 26 | String hex = COLOR.toString().replace("0x", ""); 27 | String hexRed = hex.substring(0, 2).toUpperCase(); 28 | String hexGreen = hex.substring(2, 4).toUpperCase(); 29 | String hexBlue = hex.substring(4, 6).toUpperCase(); 30 | 31 | String intRed = Integer.toString(Integer.parseInt(hexRed, 16)); 32 | String intGreen = Integer.toString(Integer.parseInt(hexGreen, 16)); 33 | String intBlue = Integer.toString(Integer.parseInt(hexBlue, 16)); 34 | 35 | return String.join("", "rgb(", intRed, ", ", intGreen, ", ", intBlue, ")"); 36 | } 37 | 38 | public static String web(final Color COLOR) { return COLOR.toString().replace("0x", "#").substring(0, 7); } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/eu/hansolo/colors/Demo.java: -------------------------------------------------------------------------------- 1 | package eu.hansolo.colors; 2 | 3 | import javafx.application.Application; 4 | import javafx.scene.Scene; 5 | import javafx.scene.control.Label; 6 | import javafx.scene.layout.StackPane; 7 | import javafx.geometry.Insets; 8 | import javafx.stage.Stage; 9 | 10 | public class Demo extends Application { 11 | 12 | @Override public void init() { 13 | 14 | } 15 | 16 | @Override public void start(final Stage stage) { 17 | StackPane pane = new StackPane(new Label("Test")); 18 | pane.setPadding(new Insets(10)); 19 | 20 | Scene scene = new Scene(pane); 21 | 22 | stage.setTitle("Test"); 23 | stage.setScene(scene); 24 | stage.show(); 25 | 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/eu/hansolo/colors/FlatColorUiPicker.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 by Gerrit Grunwald 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package eu.hansolo.colors; 18 | 19 | import javafx.application.Application; 20 | import javafx.geometry.Insets; 21 | import javafx.geometry.Pos; 22 | import javafx.scene.Scene; 23 | import javafx.scene.control.Label; 24 | import javafx.scene.control.Tooltip; 25 | import javafx.scene.input.Clipboard; 26 | import javafx.scene.input.ClipboardContent; 27 | import javafx.scene.layout.Background; 28 | import javafx.scene.layout.BackgroundFill; 29 | import javafx.scene.layout.CornerRadii; 30 | import javafx.scene.layout.GridPane; 31 | import javafx.scene.layout.HBox; 32 | import javafx.scene.layout.StackPane; 33 | import javafx.scene.layout.VBox; 34 | import javafx.scene.paint.Color; 35 | import javafx.scene.text.Font; 36 | import javafx.stage.Stage; 37 | 38 | 39 | /** 40 | * Created by hansolo on 27.01.16. 41 | */ 42 | public class FlatColorUiPicker extends Application { 43 | private static final int BOX_WIDTH = 45; 44 | private static final int BOX_HEIGHT = 45; 45 | private HBox hBox; 46 | private GridPane grid; 47 | 48 | @Override public void init() { 49 | hBox = new HBox(); 50 | hBox.setAlignment(Pos.CENTER); 51 | grid = new GridPane(); 52 | grid.setAlignment(Pos.CENTER); 53 | 54 | Font font = Font.font(9); 55 | int col = 0; 56 | int row = 0; 57 | int boxCounter = 0; 58 | int colOffset = 0; 59 | 60 | for (int i = 0 ; i < 20 ; i++) { 61 | FlatColorsUi color = FlatColorsUi.values()[i]; 62 | String name = color.name(); 63 | String strWeb = ColorHelper.web(color.get()); 64 | String strRgb = ColorHelper.rgb(color.get()); 65 | String text = String.join("", name, "\n", strWeb, "\n", strRgb); 66 | 67 | Label label = new Label(name); 68 | label.setFont(font); 69 | label.setAlignment(Pos.CENTER_LEFT); 70 | label.setTextFill(Color.WHITE); 71 | label.setMouseTransparent(true); 72 | 73 | StackPane box = new StackPane(label); 74 | box.setPrefSize(BOX_WIDTH, BOX_HEIGHT); 75 | box.setAlignment(Pos.BOTTOM_LEFT); 76 | box.setBackground(new Background(new BackgroundFill(color.get(), CornerRadii.EMPTY, Insets.EMPTY))); 77 | box.setOnMousePressed(event -> { 78 | box.setScaleX(0.9); 79 | box.setScaleY(0.9); 80 | String clipboardContent = new StringBuilder().append("Color.web(\"") 81 | .append(strWeb) 82 | .append("\");\n") 83 | .append("Color.") 84 | .append(strRgb) 85 | .append(";").toString(); 86 | 87 | Clipboard clipboard = Clipboard.getSystemClipboard(); 88 | ClipboardContent content = new ClipboardContent(); 89 | content.putString(clipboardContent); 90 | clipboard.setContent(content); 91 | }); 92 | box.setOnMouseReleased(event -> { 93 | box.setScaleX(1.0); 94 | box.setScaleY(1.0); 95 | }); 96 | 97 | Tooltip tooltip = new Tooltip(text); 98 | Tooltip.install(box, tooltip); 99 | hBox.getChildren().add(box); 100 | } 101 | 102 | int listSize = FlatColorsUi.values().length; 103 | for (int i = 20 ; i < listSize ; i++) { 104 | FlatColorsUi color = FlatColorsUi.values()[i]; 105 | String name = color.name().replace("_", " "); 106 | String strWeb = ColorHelper.web(color.get()); 107 | String strRgb = ColorHelper.rgb(color.get()); 108 | String text = String.join("", name, "\n", strWeb, "\n", strRgb); 109 | 110 | Label label = new Label(name); 111 | label.setFont(font); 112 | label.setAlignment(Pos.CENTER_LEFT); 113 | label.setTextFill(Color.WHITE); 114 | label.setMouseTransparent(true); 115 | 116 | StackPane box = new StackPane(label); 117 | box.setPrefSize(BOX_WIDTH, BOX_HEIGHT); 118 | box.setAlignment(Pos.BOTTOM_LEFT); 119 | box.setBackground(new Background(new BackgroundFill(color.get(), CornerRadii.EMPTY, Insets.EMPTY))); 120 | box.setOnMousePressed(event -> { 121 | box.setScaleX(0.9); 122 | box.setScaleY(0.9); 123 | String clipboardContent = new StringBuilder().append("Color.web(\"") 124 | .append(strWeb) 125 | .append("\");\n") 126 | .append("Color.") 127 | .append(strRgb) 128 | .append(";").toString(); 129 | 130 | Clipboard clipboard = Clipboard.getSystemClipboard(); 131 | ClipboardContent content = new ClipboardContent(); 132 | content.putString(clipboardContent); 133 | clipboard.setContent(content); 134 | }); 135 | box.setOnMouseReleased(event -> { 136 | box.setScaleX(1.0); 137 | box.setScaleY(1.0); 138 | }); 139 | 140 | Tooltip tooltip = new Tooltip(text); 141 | Tooltip.install(box, tooltip); 142 | 143 | grid.add(box, col + colOffset, row); 144 | col++; 145 | boxCounter++; 146 | if (boxCounter % 12 == 0) { 147 | col = 0; 148 | colOffset += 4; 149 | row -= 2; 150 | if (colOffset >= 16) { 151 | colOffset = 0; 152 | row += 3; 153 | } 154 | } else if (boxCounter % 4 == 0) { 155 | col = 0; 156 | row++; 157 | } 158 | } 159 | } 160 | 161 | @Override public void start(Stage stage) { 162 | VBox pane = new VBox(hBox, grid); 163 | pane.setSpacing(20); 164 | pane.setPadding(new Insets(10)); 165 | pane.setBackground(new Background(new BackgroundFill(Color.WHITE, CornerRadii.EMPTY, Insets.EMPTY))); 166 | 167 | Scene scene = new Scene(pane); 168 | 169 | stage.setTitle("Flat Colors UI"); 170 | stage.setScene(scene); 171 | stage.show(); 172 | } 173 | 174 | @Override public void stop() { 175 | System.exit(0); 176 | } 177 | 178 | public static void main(String[] args) { 179 | launch(args); 180 | } 181 | } 182 | -------------------------------------------------------------------------------- /src/main/java/eu/hansolo/colors/FlatColorsUi.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 by Gerrit Grunwald 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package eu.hansolo.colors; 18 | 19 | import javafx.scene.paint.Color; 20 | 21 | 22 | /** 23 | * Created by hansolo on 27.01.16. 24 | */ 25 | public enum FlatColorsUi implements IColor { 26 | 27 | A1(26, 188, 156), A2(22, 160, 133), A3(46, 204, 113), A4(39, 174, 96), 28 | A5(52, 152, 219), A6(41, 128, 185), A7(52, 73, 94), A8(44, 62, 80), 29 | A9(234, 76, 136), A10(202, 44, 104), A11(155, 89, 182), A12(142, 68, 173), 30 | A13(241, 196, 15), A14(243, 156, 18), A15(231, 76, 60), A16(192, 57, 43), 31 | A17(236, 240, 241), A18(189, 195, 199), A19(149, 165, 166), A20(127, 140, 141), 32 | 33 | B1(255, 204, 188), B2(255, 172, 156), B3(255, 140, 124), B4(255, 124, 108), 34 | B5(255, 108, 92), B6(247, 92, 76), B7(231, 76, 60), B8(215, 60, 44), 35 | B9(199, 44, 28), B10(183, 28, 12), B11(167, 12, 0), B12(135, 0, 0), 36 | 37 | C1(255, 188, 216), C2(255, 140, 200), C3(255, 124, 184), C4(255, 108, 168), 38 | C5(250, 92, 152), C6(234, 76, 136), C7(218, 60, 120), C8(202, 44, 104), 39 | C9(186, 28, 88), C10(170, 12, 72), C11(154, 0, 56), C12(138, 0, 40), 40 | 41 | D1(220, 198, 224), D2(206, 160, 228), D3(190, 144, 212), D4(171, 105, 198), 42 | D5(155, 89, 182), D6(142, 68, 173), D7(126, 52, 157), D8(110, 36, 141), 43 | D9( 94, 20, 125), D10( 78, 4, 109), D11( 62, 0, 93), D12( 30, 0, 61), 44 | 45 | E1( 57, 213, 255), E2( 41, 197, 255), E3( 25, 181, 254), E4( 34, 167, 240), 46 | E5( 18, 151, 224), E6( 2, 135, 208), E7( 0, 119, 192), E8( 0, 103, 176), 47 | E9( 0, 87, 160), E10( 0, 71, 144), E11( 0, 55, 128), E12( 16, 39, 112), 48 | 49 | F1( 94, 250, 247), F2( 81, 245, 234), F3( 71, 235, 224), F4( 55, 219, 208), 50 | F5( 39, 203, 192), F6( 23, 187, 176), F7( 7, 171, 160), F8( 0, 155, 144), 51 | F9( 0, 139, 128), F10( 0, 123, 112), F11( 16, 107, 96), F12( 0, 91, 80), 52 | 53 | G1(142, 255, 193), G2( 94, 252, 161), G3( 78, 236, 145), G4( 62, 220, 129), 54 | G5( 46, 204, 113), G6( 30, 188, 97), G7( 14, 172, 81), G8( 0, 156, 65), 55 | G9( 0, 140, 49), G10( 0, 124, 33), G11( 0, 108, 17), G12( 0, 92, 1), 56 | 57 | H1(253, 227, 167), H2(255, 207, 75), H3(249, 191, 59), H4(249, 179, 47), 58 | H5(245, 171, 53), H6(243, 156, 18), H7(241, 137, 45), H8(230, 126, 34), 59 | H9(216, 116, 0), H10(200, 100, 0), H11(184, 84, 0), H12(168, 68, 16), 60 | 61 | I1(255, 220, 181), I2(255, 194, 155), I3(255, 178, 139), I4(255, 162, 123), 62 | I5(255, 146, 107), I6(243, 130, 91), I7(227, 114, 75), I8(211, 98, 59), 63 | I9(195, 82, 43), I10(179, 66, 27), I11(163, 50, 11), I12(147, 34, 16), 64 | 65 | J1(246, 196, 163), J2(234, 184, 151), J3(223, 173, 140), J4(212, 162, 129), 66 | J5(206, 156, 123), J6(190, 140, 107), J7(174, 124, 91), J8(158, 108, 75), 67 | J9(142, 92, 59), J10(126, 76, 43), J11(110, 60, 27), J12( 94, 44, 11), 68 | 69 | K1(197, 211, 226), K2(188, 202, 217), K3(172, 186, 201), K4(156, 170, 185), 70 | K5(140, 154, 169), K6(124, 138, 153), K7(108, 122, 137), K8( 92, 106, 121), 71 | K9( 76, 90, 105), K10( 60, 74, 89), K11( 44, 58, 73), K12( 28, 42, 57), 72 | 73 | L1(213, 229, 230), L2(197, 213, 214), L3(181, 197, 198), L4(165, 181, 182), 74 | L5(149, 165, 166), L6(133, 149, 150), L7(117, 133, 134), L8(101, 117, 118), 75 | L9( 85, 101, 102), L10( 69, 85, 86), L11( 53, 69, 70), L12( 37, 53, 54), 76 | 77 | M1(224, 224, 224), M2(208, 208, 208), M3(192, 192, 192), M4(160, 160, 160), 78 | M5(144, 144, 144), M6(128, 128, 128), M7(112, 112, 112), M8( 96, 96, 96), 79 | M9( 80, 80, 80), M10( 64, 64, 64), M11( 48, 48, 48), M12( 0, 0, 0); 80 | 81 | private final Color COLOR; 82 | 83 | FlatColorsUi(final int R, final int G, final int B) { 84 | COLOR = Color.rgb(R, G, B); 85 | } 86 | 87 | @Override public Color get() { return COLOR; } 88 | 89 | @Override public String rgb() { return ColorHelper.rgb(COLOR); } 90 | 91 | @Override public String web() { return ColorHelper.web(COLOR); } 92 | } 93 | -------------------------------------------------------------------------------- /src/main/java/eu/hansolo/colors/FlatUi.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 by Gerrit Grunwald 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package eu.hansolo.colors; 18 | 19 | import javafx.scene.paint.Color; 20 | 21 | 22 | /** 23 | * Created by hansolo on 11.01.16. 24 | */ 25 | public enum FlatUi implements IColor { 26 | /** 27 | * The color TURQOISE with an RGB value of rgb(31, 188, 156). 28 | *


29 | */ 30 | TURQOISE(31, 188, 156), 31 | 32 | /** 33 | * The color GREEN SEA with an RGB value of rgb(26, 160, 133). 34 | *


35 | */ 36 | GREEN_SEA(26, 160, 133), 37 | 38 | /** 39 | * The color EMERLAND with an RGB value of rgb(87, 214, 141). 40 | *


41 | */ 42 | EMERLAND(87, 214, 141), 43 | 44 | /** 45 | * The color NEPHRITIS with an RGB value of rgb(39, 174, 96). 46 | *


47 | */ 48 | NEPHRITIS(39, 174, 96), 49 | 50 | /** 51 | * The color PETER RIVER with an RGB value of rgb(92, 172, 226). 52 | *


53 | */ 54 | PETER_RIVER(92, 172, 226), 55 | 56 | /** 57 | * The color BELIZE_HOLE with an RGB value of rgb(83, 153, 198). 58 | *


59 | */ 60 | BELIZE_HOLE(83, 153, 198), 61 | 62 | /** 63 | * The color AMETHYST with an RGB value of rgb(175, 122, 196). 64 | *


65 | */ 66 | AMETHYST(175, 122, 196), 67 | 68 | /** 69 | * The color WISTERIA with an RGB value of rgb(142, 68, 173). 70 | *


71 | */ 72 | WISTERIA(142, 68, 173), 73 | 74 | /** 75 | * The color SUNFLOWER with an RGB value of rgb(241, 196, 40). 76 | *


77 | */ 78 | SUNFLOWER(241, 196, 40), 79 | 80 | /** 81 | * The color ORANGE with an RGB value of rgb(245, 175, 65). 82 | *


83 | */ 84 | ORANGE(245, 175, 65), 85 | 86 | /** 87 | * The color CARROT with an RGB value of rgb(245, 175, 65). 88 | *


89 | */ 90 | CARROT(245, 175, 65), 91 | 92 | /** 93 | * The color PUMPKIN with an RGB value of rgb(211, 85, 25). 94 | *


95 | */ 96 | PUMPKIN(211, 85, 25), 97 | 98 | /** 99 | * The color ALIZARIN with an RGB value of rgb(234, 111, 99). 100 | *


101 | */ 102 | ALIZARIN(234, 111, 99), 103 | 104 | /** 105 | * The color POMEGRANATE with an RGB value of rgb(204, 96, 85). 106 | *


107 | */ 108 | POMEGRANATE(204, 96, 85), 109 | 110 | /** 111 | * The color CLOUDS with an RGB value of rgb(239, 243, 243). 112 | *


113 | */ 114 | CLOUDS(239, 243, 243), 115 | 116 | /** 117 | * The color SILVER with an RGB value of rgb(189, 195, 199). 118 | *


119 | */ 120 | SILVER(189, 195, 199), 121 | 122 | /** 123 | * The color CONCRETE with an RGB value of rgb(149, 165, 166). 124 | *


125 | */ 126 | CONCRETE(149, 165, 166), 127 | 128 | /** 129 | * The color ASBESTOS with an RGB value of rgb(127, 140, 141). 130 | *


131 | */ 132 | ASBESTOS(127, 140, 141), 133 | 134 | /** 135 | * The color WET ASPHALT with an RGB value of rgb(52, 73, 94). 136 | *


137 | */ 138 | WET_ASPHALT(52, 73, 94), 139 | 140 | /** 141 | * The color MIDNIGHT BLUE with an RGB value of rgb(44, 62, 80). 142 | *


143 | */ 144 | MIDNIGHT_BLUE(44, 62, 80); 145 | 146 | private final Color COLOR; 147 | 148 | FlatUi(final int R, final int G, final int B) { 149 | COLOR = Color.rgb(R, G, B); 150 | } 151 | 152 | @Override public Color get() { return COLOR; } 153 | 154 | @Override public String rgb() { return ColorHelper.rgb(COLOR); } 155 | 156 | @Override public String web() { return ColorHelper.web(COLOR); } 157 | } 158 | -------------------------------------------------------------------------------- /src/main/java/eu/hansolo/colors/FlatUiColorPicker.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 by Gerrit Grunwald 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package eu.hansolo.colors; 18 | 19 | import javafx.application.Application; 20 | import javafx.geometry.Insets; 21 | import javafx.geometry.Pos; 22 | import javafx.scene.control.Label; 23 | import javafx.scene.control.Tooltip; 24 | import javafx.scene.input.Clipboard; 25 | import javafx.scene.input.ClipboardContent; 26 | import javafx.scene.layout.Background; 27 | import javafx.scene.layout.BackgroundFill; 28 | import javafx.scene.layout.CornerRadii; 29 | import javafx.scene.layout.GridPane; 30 | import javafx.scene.paint.Color; 31 | import javafx.scene.text.Font; 32 | import javafx.stage.Stage; 33 | import javafx.scene.layout.StackPane; 34 | import javafx.scene.Scene; 35 | 36 | /** 37 | * User: hansolo 38 | * Date: 11.01.16 39 | * Time: 12:22 40 | */ 41 | public class FlatUiColorPicker extends Application { 42 | private static final int BOX_WIDTH = 90; 43 | private static final int BOX_HEIGHT = 90; 44 | private GridPane grid; 45 | 46 | @Override public void init() { 47 | grid = new GridPane(); 48 | 49 | Font font = Font.font(9); 50 | int col = 0; 51 | int row = 0; 52 | for (FlatUi color : FlatUi.values()) { 53 | String name = color.name().replace("_", " "); 54 | String strWeb = ColorHelper.web(color.get()); 55 | String strRgb = ColorHelper.rgb(color.get()); 56 | String text = String.join("", name, "\n", strWeb, "\n", strRgb); 57 | 58 | Label label = new Label(name); 59 | label.setFont(font); 60 | label.setAlignment(Pos.CENTER_LEFT); 61 | label.setTextFill(Color.WHITE); 62 | label.setMouseTransparent(true); 63 | 64 | StackPane box = new StackPane(label); 65 | box.setPrefSize(BOX_WIDTH, BOX_HEIGHT); 66 | box.setAlignment(Pos.BOTTOM_LEFT); 67 | box.setBackground(new Background(new BackgroundFill(color.get(), CornerRadii.EMPTY, Insets.EMPTY))); 68 | box.setOnMousePressed(event -> { 69 | box.setScaleX(0.9); 70 | box.setScaleY(0.9); 71 | String clipboardContent = new StringBuilder().append("Color.web(\"") 72 | .append(strWeb) 73 | .append("\");\n") 74 | .append("Color.") 75 | .append(strRgb) 76 | .append(";").toString(); 77 | 78 | Clipboard clipboard = Clipboard.getSystemClipboard(); 79 | ClipboardContent content = new ClipboardContent(); 80 | content.putString(clipboardContent); 81 | clipboard.setContent(content); 82 | }); 83 | box.setOnMouseReleased(event -> { 84 | box.setScaleX(1.0); 85 | box.setScaleY(1.0); 86 | }); 87 | 88 | Tooltip tooltip = new Tooltip(text); 89 | Tooltip.install(box, tooltip); 90 | grid.add(box, col, row); 91 | col++; 92 | if (col > 4) { 93 | col = 0; 94 | row++; 95 | } 96 | } 97 | } 98 | 99 | @Override public void start(Stage stage) { 100 | StackPane pane = new StackPane(); 101 | pane.getChildren().addAll(grid); 102 | 103 | Scene scene = new Scene(pane); 104 | 105 | stage.setTitle("Flat UI Colors"); 106 | stage.setScene(scene); 107 | stage.show(); 108 | } 109 | 110 | @Override public void stop() { 111 | System.exit(0); 112 | } 113 | 114 | public static void main(String[] args) { 115 | launch(args); 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /src/main/java/eu/hansolo/colors/IColor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 by Gerrit Grunwald 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package eu.hansolo.colors; 17 | 18 | import javafx.scene.paint.Color; 19 | 20 | /** 21 | * 22 | * Created by Naoghuman on 12.01.16. 23 | */ 24 | public interface IColor { 25 | 26 | /** 27 | * Returns the corresponding JavaFX color. 28 | * 29 | * @return the corresponding JavaFX color. 30 | */ 31 | public Color get(); 32 | 33 | /** 34 | * Returns a String expression from the color with the format: rgb(12, 121, 15) 35 | * 36 | * @return the String expression. 37 | */ 38 | public String rgb(); 39 | 40 | /** 41 | * Returns a String expression from the color with the format: #AB12CD 42 | * 43 | * @return the String expression. 44 | */ 45 | public String web(); 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/eu/hansolo/colors/MaterialDesign.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 by Gerrit Grunwald 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package eu.hansolo.colors; 18 | 19 | import javafx.scene.paint.Color; 20 | 21 | 22 | /** 23 | * Created by hansolo on 11.01.16. 24 | */ 25 | public enum MaterialDesign implements IColor { 26 | // RED 27 | /** 28 | * The color RED with an RGB value of rgb(244, 67, 54). 29 | *


30 | */ 31 | RED(244, 67, 54), 32 | 33 | /** 34 | * The color RED 50 with an RGB value of rgb(255, 235, 238). 35 | *


36 | */ 37 | RED_50(255, 235, 238), 38 | 39 | /** 40 | * The color RED 100 with an RGB value of rgb(255, 205, 210). 41 | *


42 | */ 43 | RED_100(255, 205, 210), 44 | 45 | /** 46 | * The color RED 200 with an RGB value of rgb(239, 154, 154). 47 | *


48 | */ 49 | RED_200(239, 154, 154), 50 | 51 | /** 52 | * The color RED 300 with an RGB value of rgb(229, 115, 115). 53 | *


54 | */ 55 | RED_300(229, 115, 115), 56 | 57 | /** 58 | * The color RED 400 with an RGB value of rgb(239, 83, 80). 59 | *


60 | */ 61 | RED_400(239, 83, 80), 62 | 63 | /** 64 | * The color RED 500 with an RGB value of rgb(244, 67, 54). 65 | *


66 | */ 67 | RED_500(244, 67, 54), 68 | 69 | /** 70 | * The color RED 600 with an RGB value of rgb(229, 57, 53). 71 | *


72 | */ 73 | RED_600(229, 57, 53), 74 | 75 | /** 76 | * The color RED 700 with an RGB value of rgb(211, 47, 47). 77 | *


78 | */ 79 | RED_700(211, 47, 47), 80 | 81 | /** 82 | * The color RED 800 with an RGB value of rgb(198, 40, 40). 83 | *


84 | */ 85 | RED_800(198, 40, 40), 86 | 87 | /** 88 | * The color RED 900 with an RGB value of rgb(183, 28, 28). 89 | *


90 | */ 91 | RED_900(183, 28, 28), 92 | 93 | /** 94 | * The color RED A100 with an RGB value of rgb(255, 138, 128). 95 | *


96 | */ 97 | RED_A100(255, 138, 128), 98 | 99 | /** 100 | * The color RED A200 with an RGB value of rgb(255, 82, 82). 101 | *


102 | */ 103 | RED_A200(255, 82, 82), 104 | 105 | /** 106 | * The color RED A400 with an RGB value of rgb(255, 23, 68). 107 | *


108 | */ 109 | RED_A400(255, 23, 68), 110 | 111 | /** 112 | * The color RED A700 with an RGB value of rgb(213, 0, 0). 113 | *


114 | */ 115 | RED_A700(213, 0, 0), 116 | 117 | // PINK 118 | /** 119 | * The color PINK with an RGB value of rgb(233, 30, 99). 120 | *


121 | */ 122 | PINK(233, 30, 99), 123 | 124 | /** 125 | * The color PINK 50 with an RGB value of rgb(252, 228, 236). 126 | *


127 | */ 128 | PINK_50(252, 228, 236), 129 | 130 | /** 131 | * The color PINK 100 with an RGB value of rgb(248, 187, 208). 132 | *


133 | */ 134 | PINK_100(248, 187, 208), 135 | 136 | /** 137 | * The color PINK 200 with an RGB value of rgb(244, 143, 177). 138 | *


139 | */ 140 | PINK_200(244, 143, 177), 141 | 142 | /** 143 | * The color PINK 300 with an RGB value of rgb(240, 98, 146). 144 | *


145 | */ 146 | PINK_300(240, 98, 146), 147 | 148 | /** 149 | * The color PINK 400 with an RGB value of rgb(236, 64, 122). 150 | *


151 | */ 152 | PINK_400(236, 64, 122), 153 | 154 | /** 155 | * The color PINK 500 with an RGB value of rgb(233, 30, 99). 156 | *


157 | */ 158 | PINK_500(233, 30, 99), 159 | 160 | /** 161 | * The color PINK 600 with an RGB value of rgb(216, 27, 96). 162 | *


163 | */ 164 | PINK_600(216, 27, 96), 165 | 166 | /** 167 | * The color PINK 700 with an RGB value of rgb(194, 24, 91). 168 | *


169 | */ 170 | PINK_700(194, 24, 91), 171 | 172 | /** 173 | * The color PINK 800 with an RGB value of rgb(173, 20, 87). 174 | *


175 | */ 176 | PINK_800(173, 20, 87), 177 | 178 | /** 179 | * The color PINK 900 with an RGB value of rgb(136, 14, 79). 180 | *


181 | */ 182 | PINK_900(136, 14, 79), 183 | 184 | /** 185 | * The color PINK A100 with an RGB value of rgb(255, 128, 171). 186 | *


187 | */ 188 | PINK_A100(255, 128, 171), 189 | 190 | /** 191 | * The color PINK A200 with an RGB value of rgb(255, 64, 129). 192 | *


193 | */ 194 | PINK_A200(255, 64, 129), 195 | 196 | /** 197 | * The color PINK A400 with an RGB value of rgb(245, 0, 87). 198 | *


199 | */ 200 | PINK_A400(245, 0, 87), 201 | 202 | /** 203 | * The color PINK A700 with an RGB value of rgb(197, 17, 98). 204 | *


205 | */ 206 | PINK_A700(197, 17, 98), 207 | 208 | // PURPLE 209 | /** 210 | * The color PURPLE with an RGB value of rgb(156, 39, 176). 211 | *


212 | */ 213 | PURPLE(156, 39, 176), 214 | 215 | /** 216 | * The color PURPLE 50 with an RGB value of rgb(243, 229, 245). 217 | *


218 | */ 219 | PURPLE_50(243, 229, 245), 220 | 221 | /** 222 | * The color PURPLE 100 with an RGB value of rgb(225, 190, 231). 223 | *


224 | */ 225 | PURPLE_100(225, 190, 231), 226 | 227 | /** 228 | * The color PURPLE 200 with an RGB value of rgb(206, 147, 216). 229 | *


230 | */ 231 | PURPLE_200(206, 147, 216), 232 | 233 | /** 234 | * The color PURPLE 300 with an RGB value of rgb(186, 104, 200). 235 | *


236 | */ 237 | PURPLE_300(186, 104, 200), 238 | 239 | /** 240 | * The color PURPLE 400 with an RGB value of rgb(171, 71, 188). 241 | *


242 | */ 243 | PURPLE_400(171, 71, 188), 244 | 245 | /** 246 | * The color PURPLE 500 with an RGB value of rgb(156, 39, 176). 247 | *


248 | */ 249 | PURPLE_500(156, 39, 176), 250 | 251 | /** 252 | * The color PURPLE 600 with an RGB value of rgb(142, 36, 170). 253 | *


254 | */ 255 | PURPLE_600(142, 36, 170), 256 | 257 | /** 258 | * The color PURPLE 700 with an RGB value of rgb(123, 31, 162). 259 | *


260 | */ 261 | PURPLE_700(123, 31, 162), 262 | 263 | /** 264 | * The color PURPLE 800 with an RGB value of rgb(106, 27, 154). 265 | *


266 | */ 267 | PURPLE_800(106, 27, 154), 268 | 269 | /** 270 | * The color PURPLE 900 with an RGB value of rgb(74, 20, 140). 271 | *


272 | */ 273 | PURPLE_900(74, 20, 140), 274 | 275 | /** 276 | * The color PURPLE A100 with an RGB value of rgb(234, 128, 252). 277 | *


278 | */ 279 | PURPLE_A100(234, 128, 252), 280 | 281 | /** 282 | * The color PURPLE A200 with an RGB value of rgb(224, 64, 251). 283 | *


284 | */ 285 | PURPLE_A200(224, 64, 251), 286 | 287 | /** 288 | * The color PURPLE A400 with an RGB value of rgb(213, 0, 249). 289 | *


290 | */ 291 | PURPLE_A400(213, 0, 249), 292 | 293 | /** 294 | * The color PURPLE A700 with an RGB value of rgb(170, 0, 255). 295 | *


296 | */ 297 | PURPLE_A700(170, 0, 255), 298 | 299 | // DEEP PURPLE 300 | /** 301 | * The color DEEP PURPLE with an RGB value of rgb(103, 58, 183). 302 | *


303 | */ 304 | DEEP_PURPLE(103, 58, 183), 305 | 306 | /** 307 | * The color DEEP PURPLE 50 with an RGB value of rgb(237, 231, 246). 308 | *


309 | */ 310 | DEEP_PURPLE_50(237, 231, 246), 311 | 312 | /** 313 | * The color DEEP PURPLE 100 with an RGB value of rgb(209, 196, 233). 314 | *


315 | */ 316 | DEEP_PURPLE_100(209, 196, 233), 317 | 318 | /** 319 | * The color DEEP PURPLE 200 with an RGB value of rgb(179, 157, 219). 320 | *


321 | */ 322 | DEEP_PURPLE_200(179, 157, 219), 323 | 324 | /** 325 | * The color DEEP PURPLE 300 with an RGB value of rgb(149, 117, 205). 326 | *


327 | */ 328 | DEEP_PURPLE_300(149, 117, 205), 329 | 330 | /** 331 | * The color DEEP PURPLE 400 with an RGB value of rgb(126, 87, 194). 332 | *


333 | */ 334 | DEEP_PURPLE_400(126, 87, 194), 335 | 336 | /** 337 | * The color DEEP PURPLE 500 with an RGB value of rgb(103, 58, 183). 338 | *


339 | */ 340 | DEEP_PURPLE_500(103, 58, 183), 341 | 342 | /** 343 | * The color DEEP PURPLE 600 with an RGB value of rgb(94, 53, 177). 344 | *


345 | */ 346 | DEEP_PURPLE_600(94, 53, 177), 347 | 348 | /** 349 | * The color DEEP PURPLE 700 with an RGB value of rgb(81, 45, 168). 350 | *


351 | */ 352 | DEEP_PURPLE_700(81, 45, 168), 353 | 354 | /** 355 | * The color DEEP PURPLE 800 with an RGB value of rgb(69, 39, 160). 356 | *


357 | */ 358 | DEEP_PURPLE_800(69, 39, 160), 359 | 360 | /** 361 | * The color DEEP PURPLE 900 with an RGB value of rgb(49, 27, 146). 362 | *


363 | */ 364 | DEEP_PURPLE_900(49, 27, 146), 365 | 366 | /** 367 | * The color DEEP PURPLE A100 with an RGB value of rgb(179, 136, 255). 368 | *


369 | */ 370 | DEEP_PURPLE_A100(179, 136, 255), 371 | 372 | /** 373 | * The color DEEP PURPLE A200 with an RGB value of rgb(124, 77, 255). 374 | *


375 | */ 376 | DEEP_PURPLE_A200(124, 77, 255), 377 | 378 | /** 379 | * The color DEEP PURPLE A400 with an RGB value of rgb(101, 31, 255). 380 | *


381 | */ 382 | DEEP_PURPLE_A400(101, 31, 255), 383 | 384 | /** 385 | * The color DEEP PURPLE A700 with an RGB value of rgb(98, 0, 234). 386 | *


387 | */ 388 | DEEP_PURPLE_A700(98, 0, 234), 389 | 390 | // INDIGO 391 | /** 392 | * The color INDIGO with an RGB value of rgb(63, 81, 181). 393 | *


394 | */ 395 | INDIGO(63, 81, 181), 396 | 397 | /** 398 | * The color INDIGO 50 with an RGB value of rgb(232, 234, 246). 399 | *


400 | */ 401 | INDIGO_50(232, 234, 246), 402 | 403 | /** 404 | * The color INDIGO 100 with an RGB value of rgb(197, 202, 233). 405 | *


406 | */ 407 | INDIGO_100(197, 202, 233), 408 | 409 | /** 410 | * The color INDIGO 200 with an RGB value of rgb(159, 168, 218). 411 | *


412 | */ 413 | INDIGO_200(159, 168, 218), 414 | 415 | /** 416 | * The color INDIGO 300 with an RGB value of rgb(121, 134, 203). 417 | *


418 | */ 419 | INDIGO_300(121, 134, 203), 420 | 421 | /** 422 | * The color INDIGO 400 with an RGB value of rgb(92, 107, 192). 423 | *


424 | */ 425 | INDIGO_400(92, 107, 192), 426 | 427 | /** 428 | * The color INDIGO 500 with an RGB value of rgb(63, 81, 181). 429 | *


430 | */ 431 | INDIGO_500(63, 81, 181), 432 | 433 | /** 434 | * The color INDIGO 600 with an RGB value of rgb(57, 73, 171). 435 | *


436 | */ 437 | INDIGO_600(57, 73, 171), 438 | 439 | /** 440 | * The color INDIGO 700 with an RGB value of rgb(48, 63, 159). 441 | *


442 | */ 443 | INDIGO_700(48, 63, 159), 444 | 445 | /** 446 | * The color INDIGO 800 with an RGB value of rgb(40, 53, 147). 447 | *


448 | */ 449 | INDIGO_800(40, 53, 147), 450 | 451 | /** 452 | * The color INDIGO 900 with an RGB value of rgb(26, 35, 126). 453 | *


454 | */ 455 | INDIGO_900(26, 35, 126), 456 | 457 | /** 458 | * The color INDIGO A100 with an RGB value of rgb(140, 158, 255). 459 | *


460 | */ 461 | INDIGO_A100(140, 158, 255), 462 | 463 | /** 464 | * The color INDIGO A200 with an RGB value of rgb(83, 109, 254). 465 | *


466 | */ 467 | INDIGO_A200(83, 109, 254), 468 | 469 | /** 470 | * The color INDIGO A400 with an RGB value of rgb(61, 90, 254). 471 | *


472 | */ 473 | INDIGO_A400(61, 90, 254), 474 | 475 | /** 476 | * The color INDIGO A700 with an RGB value of rgb(48, 79, 254). 477 | *


478 | */ 479 | INDIGO_A700(48, 79, 254), 480 | 481 | // BLUE 482 | /** 483 | * The color BLUE with an RGB value of rgb(33, 150, 243). 484 | *


485 | */ 486 | BLUE(33, 150, 243), 487 | 488 | /** 489 | * The color BLUE 50 with an RGB value of rgb(227, 242, 253). 490 | *


491 | */ 492 | BLUE_50(227, 242, 253), 493 | 494 | /** 495 | * The color BLUE 100 with an RGB value of rgb(187, 222, 251). 496 | *


497 | */ 498 | BLUE_100(187, 222, 251), 499 | 500 | /** 501 | * The color BLUE 200 with an RGB value of rgb(144, 202, 249). 502 | *


503 | */ 504 | BLUE_200(144, 202, 249), 505 | 506 | /** 507 | * The color BLUE 300 with an RGB value of rgb(100, 181, 246). 508 | *


509 | */ 510 | BLUE_300(100, 181, 246), 511 | 512 | /** 513 | * The color BLUE 400 with an RGB value of rgb(66, 165, 245). 514 | *


515 | */ 516 | BLUE_400(66, 165, 245), 517 | 518 | /** 519 | * The color BLUE 500 with an RGB value of rgb(33, 150, 243). 520 | *


521 | */ 522 | BLUE_500(33, 150, 243), 523 | 524 | /** 525 | * The color BLUE 600 with an RGB value of rgb(30, 136, 229). 526 | *


527 | */ 528 | BLUE_600(30, 136, 229), 529 | 530 | /** 531 | * The color BLUE 700 with an RGB value of rgb(25, 118, 210). 532 | *


533 | */ 534 | BLUE_700(25, 118, 210), 535 | 536 | /** 537 | * The color BLUE 800 with an RGB value of rgb(21, 101, 192). 538 | *


539 | */ 540 | BLUE_800(21, 101, 192), 541 | 542 | /** 543 | * The color BLUE 900 with an RGB value of rgb(13, 71, 161). 544 | *


545 | */ 546 | BLUE_900(13, 71, 161), 547 | 548 | /** 549 | * The color BLUE A100 with an RGB value of rgb(130, 177, 255). 550 | *


551 | */ 552 | BLUE_A100(130, 177, 255), 553 | 554 | /** 555 | * The color BLUE A200 with an RGB value of rgb(68, 138, 255). 556 | *


557 | */ 558 | BLUE_A200(68, 138, 255), 559 | 560 | /** 561 | * The color BLUE A400 with an RGB value of rgb(41, 121, 255). 562 | *


563 | */ 564 | BLUE_A400(41, 121, 255), 565 | 566 | /** 567 | * The color BLUE A700 with an RGB value of rgb(41, 98, 255). 568 | *


569 | */ 570 | BLUE_A700(41, 98, 255), 571 | 572 | // LIGHT_BLUE 573 | /** 574 | * The color LIGHT BLUE with an RGB value of rgb(3, 169, 244). 575 | *


576 | */ 577 | LIGHT_BLUE(3, 169, 244), 578 | 579 | /** 580 | * The color LIGHT BLUE 50 with an RGB value of rgb(225, 245, 254). 581 | *


582 | */ 583 | LIGHT_BLUE_50(225, 245, 254), 584 | 585 | /** 586 | * The color LIGHT BLUE 100 with an RGB value of rgb(179, 229, 252). 587 | *


588 | */ 589 | LIGHT_BLUE_100(179, 229, 252), 590 | 591 | /** 592 | * The color LIGHT BLUE 200 with an RGB value of rgb(129, 212, 250). 593 | *


594 | */ 595 | LIGHT_BLUE_200(129, 212, 250), 596 | 597 | /** 598 | * The color LIGHT BLUE 300 with an RGB value of rgb(79, 195, 247). 599 | *


600 | */ 601 | LIGHT_BLUE_300(79, 195, 247), 602 | 603 | /** 604 | * The color LIGHT BLUE 400 with an RGB value of rgb(41, 182, 246). 605 | *


606 | */ 607 | LIGHT_BLUE_400(41, 182, 246), 608 | 609 | /** 610 | * The color LIGHT BLUE 500 with an RGB value of rgb(3, 169, 244). 611 | *


612 | */ 613 | LIGHT_BLUE_500(3, 169, 244), 614 | 615 | /** 616 | * The color LIGHT BLUE 600 with an RGB value of rgb(3, 155, 229). 617 | *


618 | */ 619 | LIGHT_BLUE_600(3, 155, 229), 620 | 621 | /** 622 | * The color LIGHT BLUE 700 with an RGB value of rgb(2, 136, 209). 623 | *


624 | */ 625 | LIGHT_BLUE_700(2, 136, 209), 626 | 627 | /** 628 | * The color LIGHT BLUE 800 with an RGB value of rgb(2, 119, 189). 629 | *


630 | */ 631 | LIGHT_BLUE_800(2, 119, 189), 632 | 633 | /** 634 | * The color LIGHT BLUE 900 with an RGB value of rgb(1, 87, 155). 635 | *


636 | */ 637 | LIGHT_BLUE_900(1, 87, 155), 638 | 639 | /** 640 | * The color LIGHT BLUE A100 with an RGB value of rgb(128, 216, 255). 641 | *


642 | */ 643 | LIGHT_BLUE_A100(128, 216, 255), 644 | 645 | /** 646 | * The color LIGHT BLUE A200 with an RGB value of rgb(64, 196, 255). 647 | *


648 | */ 649 | LIGHT_BLUE_A200(64, 196, 255), 650 | 651 | /** 652 | * The color LIGHT BLUE A400 with an RGB value of rgb(0, 176, 255). 653 | *


654 | */ 655 | LIGHT_BLUE_A400(0, 176, 255), 656 | 657 | /** 658 | * The color LIGHT BLUE A700 with an RGB value of rgb(0, 145, 234). 659 | *


660 | */ 661 | LIGHT_BLUE_A700(0, 145, 234), 662 | 663 | // CYAN 664 | /** 665 | * The color CYAN with an RGB value of rgb(0, 188, 212). 666 | *


667 | */ 668 | CYAN(0, 188, 212), 669 | 670 | /** 671 | * The color CYAN 50 with an RGB value of rgb(224, 247, 250). 672 | *


673 | */ 674 | CYAN_50(224, 247, 250), 675 | 676 | /** 677 | * The color CYAN 100 with an RGB value of rgb(178, 235, 242). 678 | *


679 | */ 680 | CYAN_100(178, 235, 242), 681 | 682 | /** 683 | * The color CYAN 200 with an RGB value of rgb(128, 222, 234). 684 | *


685 | */ 686 | CYAN_200(128, 222, 234), 687 | 688 | /** 689 | * The color CYAN 300 with an RGB value of rgb(77, 208, 225). 690 | *


691 | */ 692 | CYAN_300(77, 208, 225), 693 | 694 | /** 695 | * The color CYAN 400 with an RGB value of rgb(38, 198, 218). 696 | *


697 | */ 698 | CYAN_400(38, 198, 218), 699 | 700 | /** 701 | * The color CYAN 500 with an RGB value of rgb(0, 188, 212). 702 | *


703 | */ 704 | CYAN_500(0, 188, 212), 705 | 706 | /** 707 | * The color CYAN 600 with an RGB value of rgb(0, 172, 193). 708 | *


709 | */ 710 | CYAN_600(0, 172, 193), 711 | 712 | /** 713 | * The color CYAN 700 with an RGB value of rgb(0, 151, 167). 714 | *


715 | */ 716 | CYAN_700(0, 151, 167), 717 | 718 | /** 719 | * The color CYAN 800 with an RGB value of rgb(0, 131, 143). 720 | *


721 | */ 722 | CYAN_800(0, 131, 143), 723 | 724 | /** 725 | * The color CYAN 900 with an RGB value of rgb(0, 96, 100). 726 | *


727 | */ 728 | CYAN_900(0, 96, 100), 729 | 730 | /** 731 | * The color CYAN A100 with an RGB value of rgb(132, 255, 255). 732 | *


733 | */ 734 | CYAN_A100(132, 255, 255), 735 | 736 | /** 737 | * The color CYAN A200 with an RGB value of rgb(24, 255, 25). 738 | *


739 | */ 740 | CYAN_A200(24, 255, 255), 741 | 742 | /** 743 | * The color CYAN A400 with an RGB value of rgb(0, 229, 255). 744 | *


745 | */ 746 | CYAN_A400(0, 229, 255), 747 | 748 | /** 749 | * The color CYAN A700 with an RGB value of rgb(0, 184, 212). 750 | *


751 | */ 752 | CYAN_A700(0, 184, 212), 753 | 754 | // TEAL 755 | /** 756 | * The color TEAL with an RGB value of rgb(0, 150, 136). 757 | *


758 | */ 759 | TEAL(0, 150, 136), 760 | 761 | /** 762 | * The color TEAL 50 with an RGB value of rgb(224, 242, 241). 763 | *


764 | */ 765 | TEAL_50(224, 242, 241), 766 | 767 | /** 768 | * The color TEAL 100 with an RGB value of rgb(178, 223, 219). 769 | *


770 | */ 771 | TEAL_100(178, 223, 219), 772 | 773 | /** 774 | * The color TEAL 200 with an RGB value of rgb(128, 203, 196). 775 | *


776 | */ 777 | TEAL_200(128, 203, 196), 778 | 779 | /** 780 | * The color TEAL 300 with an RGB value of rgb(77, 182, 172). 781 | *


782 | */ 783 | TEAL_300(77, 182, 172), 784 | 785 | /** 786 | * The color TEAL 400 with an RGB value of rgb(38, 166, 154). 787 | *


788 | */ 789 | TEAL_400(38, 166, 154), 790 | 791 | /** 792 | * The color TEAL 500 with an RGB value of rgb(0, 150, 136). 793 | *


794 | */ 795 | TEAL_500(0, 150, 136), 796 | 797 | /** 798 | * The color TEAL 600 with an RGB value of rgb(0, 137, 123). 799 | *


800 | */ 801 | TEAL_600(0, 137, 123), 802 | 803 | /** 804 | * The color TEAL 700 with an RGB value of rgb(0, 121, 107). 805 | *


806 | */ 807 | TEAL_700(0, 121, 107), 808 | 809 | /** 810 | * The color TEAL 800 with an RGB value of rgb(0, 105, 92). 811 | *


812 | */ 813 | TEAL_800(0, 105, 92), 814 | 815 | /** 816 | * The color TEAL 900 with an RGB value of rgb(0, 77, 64). 817 | *


818 | */ 819 | TEAL_900(0, 77, 64), 820 | 821 | /** 822 | * The color TEAL A100 with an RGB value of rgb(167, 255, 235). 823 | *


824 | */ 825 | TEAL_A100(167, 255, 235), 826 | 827 | /** 828 | * The color TEAL A200 with an RGB value of rgb(100, 255, 218). 829 | *


830 | */ 831 | TEAL_A200(100, 255, 218), 832 | 833 | /** 834 | * The color TEAL A400 with an RGB value of rgb(29, 233, 182). 835 | *


836 | */ 837 | TEAL_A400(29, 233, 182), 838 | 839 | /** 840 | * The color TEAL A700 with an RGB value of rgb(0, 191, 165). 841 | *


842 | */ 843 | TEAL_A700(0, 191, 165), 844 | 845 | // GREEN 846 | /** 847 | * The color GREEN with an RGB value of rgb(76, 175, 80). 848 | *


849 | */ 850 | GREEN(76, 175, 80), 851 | 852 | /** 853 | * The color GREEN 50 with an RGB value of rgb(232, 245, 233). 854 | *


855 | */ 856 | GREEN_50(232, 245, 233), 857 | 858 | /** 859 | * The color GREEN 100 with an RGB value of rgb(200, 230, 201). 860 | *


861 | */ 862 | GREEN_100(200, 230, 201), 863 | 864 | /** 865 | * The color GREEN 200 with an RGB value of rgb(165, 214, 167). 866 | *


867 | */ 868 | GREEN_200(165, 214, 167), 869 | 870 | /** 871 | * The color GREEN 300 with an RGB value of rgb(129, 199, 132). 872 | *


873 | */ 874 | GREEN_300(129, 199, 132), 875 | 876 | /** 877 | * The color GREEN 400 with an RGB value of rgb(102, 187, 106). 878 | *


879 | */ 880 | GREEN_400(102, 187, 106), 881 | 882 | /** 883 | * The color GREEN 500 with an RGB value of rgb(76, 175, 80). 884 | *


885 | */ 886 | GREEN_500(76, 175, 80), 887 | 888 | /** 889 | * The color GREEN 600 with an RGB value of rgb(67, 160, 71). 890 | *


891 | */ 892 | GREEN_600(67, 160, 71), 893 | 894 | /** 895 | * The color GREEN 700 with an RGB value of rgb(56, 142, 60). 896 | *


897 | */ 898 | GREEN_700(56, 142, 60), 899 | 900 | /** 901 | * The color GREEN 800 with an RGB value of rgb(46, 125, 50). 902 | *


903 | */ 904 | GREEN_800(46, 125, 50), 905 | 906 | /** 907 | * The color GREEN 900 with an RGB value of rgb(27, 94, 32). 908 | *


909 | */ 910 | GREEN_900(27, 94, 32), 911 | 912 | /** 913 | * The color GREEN A100 with an RGB value of rgb(185, 246, 202). 914 | *


915 | */ 916 | GREEN_A100(185, 246, 202), 917 | 918 | /** 919 | * The color GREEN A200 with an RGB value of rgb(105, 240, 174). 920 | *


921 | */ 922 | GREEN_A200(105, 240, 174), 923 | 924 | /** 925 | * The color GREEN A400 with an RGB value of rgb(0, 230, 118). 926 | *


927 | */ 928 | GREEN_A400(0, 230, 118), 929 | 930 | /** 931 | * The color GREEN A700 with an RGB value of rgb(0, 200, 83). 932 | *


933 | */ 934 | GREEN_A700(0, 200, 83), 935 | 936 | // LIGHT_GREEN 937 | /** 938 | * The color LIGHT GREEN with an RGB value of rgb(139, 195, 74). 939 | *


940 | */ 941 | LIGHT_GREEN(139, 195, 74), 942 | 943 | /** 944 | * The color LIGHT GREEN 50 with an RGB value of rgb(241, 248, 233). 945 | *


946 | */ 947 | LIGHT_GREEN_50(241, 248, 233), 948 | 949 | /** 950 | * The color LIGHT GREEN 100 with an RGB value of rgb(220, 237, 200). 951 | *


952 | */ 953 | LIGHT_GREEN_100(220, 237, 200), 954 | 955 | /** 956 | * The color LIGHT GREEN 200 with an RGB value of rgb(197, 225, 165). 957 | *


958 | */ 959 | LIGHT_GREEN_200(197, 225, 165), 960 | 961 | /** 962 | * The color LIGHT GREEN 300 with an RGB value of rgb(174, 213, 129). 963 | *


964 | */ 965 | LIGHT_GREEN_300(174, 213, 129), 966 | 967 | /** 968 | * The color LIGHT GREEN 400 with an RGB value of rgb(156, 204, 101). 969 | *


970 | */ 971 | LIGHT_GREEN_400(156, 204, 101), 972 | 973 | /** 974 | * The color LIGHT GREEN 500 with an RGB value of rgb(139, 195, 74). 975 | *


976 | */ 977 | LIGHT_GREEN_500(139, 195, 74), 978 | 979 | /** 980 | * The color LIGHT GREEN 600 with an RGB value of rgb(124, 179, 66). 981 | *


982 | */ 983 | LIGHT_GREEN_600(124, 179, 66), 984 | 985 | /** 986 | * The color LIGHT GREEN 700 with an RGB value of rgb(104, 159, 56). 987 | *


988 | */ 989 | LIGHT_GREEN_700(104, 159, 56), 990 | 991 | /** 992 | * The color LIGHT GREEN 800 with an RGB value of rgb(85, 139, 47). 993 | *


994 | */ 995 | LIGHT_GREEN_800(85, 139, 47), 996 | 997 | /** 998 | * The color LIGHT GREEN 900 with an RGB value of rgb(51, 105, 30). 999 | *


1000 | */ 1001 | LIGHT_GREEN_900(51, 105, 30), 1002 | 1003 | /** 1004 | * The color LIGHT GREEN A100 with an RGB value of rgb(204, 255, 144). 1005 | *


1006 | */ 1007 | LIGHT_GREEN_A100(204, 255, 144), 1008 | 1009 | /** 1010 | * The color LIGHT GREEN A200 with an RGB value of rgb(178, 255, 89). 1011 | *


1012 | */ 1013 | LIGHT_GREEN_A200(178, 255, 89), 1014 | 1015 | /** 1016 | * The color LIGHT GREEN A400 with an RGB value of rgb(118, 255, 3). 1017 | *


1018 | */ 1019 | LIGHT_GREEN_A400(118, 255, 3), 1020 | 1021 | /** 1022 | * The color LIGHT GREEN A700 with an RGB value of rgb(100, 221, 23). 1023 | *


1024 | */ 1025 | LIGHT_GREEN_A700(100, 221, 23), 1026 | 1027 | //LIME 1028 | /** 1029 | * The color LIME with an RGB value of rgb(205, 220, 57). 1030 | *


1031 | */ 1032 | LIME(205, 220, 57), 1033 | 1034 | /** 1035 | * The color LIME 50 with an RGB value of rgb(249, 251, 231). 1036 | *


1037 | */ 1038 | LIME_50(249, 251, 231), 1039 | 1040 | /** 1041 | * The color LIME 100 with an RGB value of rgb(240, 244, 195). 1042 | *


1043 | */ 1044 | LIME_100(240, 244, 195), 1045 | 1046 | /** 1047 | * The color LIME 200 with an RGB value of rgb(230, 238, 156). 1048 | *


1049 | */ 1050 | LIME_200(230, 238, 156), 1051 | 1052 | /** 1053 | * The color LIME 300 with an RGB value of rgb(220, 231, 117). 1054 | *


1055 | */ 1056 | LIME_300(220, 231, 117), 1057 | 1058 | /** 1059 | * The color LIME 400 with an RGB value of rgb(212, 225, 87). 1060 | *


1061 | */ 1062 | LIME_400(212, 225, 87), 1063 | 1064 | /** 1065 | * The color LIME 500 with an RGB value of rgb(205, 220, 57). 1066 | *


1067 | */ 1068 | LIME_500(205, 220, 57), 1069 | 1070 | /** 1071 | * The color LIME 600 with an RGB value of rgb(192, 202, 51). 1072 | *


1073 | */ 1074 | LIME_600(192, 202, 51), 1075 | 1076 | /** 1077 | * The color LIME 700 with an RGB value of rgb(175, 180, 43). 1078 | *


1079 | */ 1080 | LIME_700(175, 180, 43), 1081 | 1082 | /** 1083 | * The color LIME 800 with an RGB value of rgb(158, 157, 36). 1084 | *


1085 | */ 1086 | LIME_800(158, 157, 36), 1087 | 1088 | /** 1089 | * The color LIME 900 with an RGB value of rgb(130, 119, 23). 1090 | *


1091 | */ 1092 | LIME_900(130, 119, 23), 1093 | 1094 | /** 1095 | * The color LIME A100 with an RGB value of rgb(244, 255, 129). 1096 | *


1097 | */ 1098 | LIME_A100(244, 255, 129), 1099 | 1100 | /** 1101 | * The color LIME A200 with an RGB value of rgb(238, 255, 65). 1102 | *


1103 | */ 1104 | LIME_A200(238, 255, 65), 1105 | 1106 | /** 1107 | * The color LIME A400 with an RGB value of rgb(198, 255, 0). 1108 | *


1109 | */ 1110 | LIME_A400(198, 255, 0), 1111 | 1112 | /** 1113 | * The color LIME A700 with an RGB value of rgb(174, 234, 0). 1114 | *


1115 | */ 1116 | LIME_A700(174, 234, 0), 1117 | 1118 | // YELLOW 1119 | /** 1120 | * The color YELLOW with an RGB value of rgb(255, 235, 59). 1121 | *


1122 | */ 1123 | YELLOW(255, 235, 59), 1124 | 1125 | /** 1126 | * The color YELLOW 50 with an RGB value of rgb(255, 253, 231). 1127 | *


1128 | */ 1129 | YELLOW_50(255, 253, 231), 1130 | 1131 | /** 1132 | * The color YELLOW 100 with an RGB value of rgb(255, 249, 196). 1133 | *


1134 | */ 1135 | YELLOW_100(255, 249, 196), 1136 | 1137 | /** 1138 | * The color YELLOW 200 with an RGB value of rgb(255, 245, 157). 1139 | *


1140 | */ 1141 | YELLOW_200(255, 245, 157), 1142 | 1143 | /** 1144 | * The color YELLOW 300 with an RGB value of rgb(255, 241, 118). 1145 | *


1146 | */ 1147 | YELLOW_300(255, 241, 118), 1148 | 1149 | /** 1150 | * The color YELLOW 400 with an RGB value of rgb(255, 238, 88). 1151 | *


1152 | */ 1153 | YELLOW_400(255, 238, 88), 1154 | 1155 | /** 1156 | * The color YELLOW 500 with an RGB value of rgb(255, 235, 59). 1157 | *


1158 | */ 1159 | YELLOW_500(255, 235, 59), 1160 | 1161 | /** 1162 | * The color YELLOW 600 with an RGB value of rgb(253, 216, 53). 1163 | *


1164 | */ 1165 | YELLOW_600(253, 216, 53), 1166 | 1167 | /** 1168 | * The color YELLOW 700 with an RGB value of rgb(251, 192, 45). 1169 | *


1170 | */ 1171 | YELLOW_700(251, 192, 45), 1172 | 1173 | /** 1174 | * The color YELLOW 800 with an RGB value of rgb(249, 168, 37). 1175 | *


1176 | */ 1177 | YELLOW_800(249, 168, 37), 1178 | 1179 | /** 1180 | * The color YELLOW 900 with an RGB value of rgb(245, 127, 23). 1181 | *


1182 | */ 1183 | YELLOW_900(245, 127, 23), 1184 | 1185 | /** 1186 | * The color YELLOW A100 with an RGB value of rgb(255, 255, 141). 1187 | *


1188 | */ 1189 | YELLOW_A100(255, 255, 141), 1190 | 1191 | /** 1192 | * The color YELLOW A200 with an RGB value of rgb(255, 255, 0). 1193 | *


1194 | */ 1195 | YELLOW_A200(255, 255, 0), 1196 | 1197 | /** 1198 | * The color YELLOW A400 with an RGB value of rgb(255, 234, 0). 1199 | *


1200 | */ 1201 | YELLOW_A400(255, 234, 0), 1202 | 1203 | /** 1204 | * The color YELLOW A700 with an RGB value of rgb(255, 214, 0). 1205 | *


1206 | */ 1207 | YELLOW_A700(255, 214, 0), 1208 | 1209 | // AMBER 1210 | /** 1211 | * The color AMBER with an RGB value of rgb(255, 193, 7). 1212 | *


1213 | */ 1214 | AMBER(255, 193, 7), 1215 | 1216 | /** 1217 | * The color AMBER 50 with an RGB value of rgb(255, 248, 225). 1218 | *


1219 | */ 1220 | AMBER_50(255, 248, 225), 1221 | 1222 | /** 1223 | * The color AMBER 100 with an RGB value of rgb(255, 249, 196). 1224 | *


1225 | */ 1226 | AMBER_100(255, 249, 196), 1227 | 1228 | /** 1229 | * The color AMBER 200 with an RGB value of rgb(255, 224, 130). 1230 | *


1231 | */ 1232 | AMBER_200(255, 224, 130), 1233 | 1234 | /** 1235 | * The color AMBER 300 with an RGB value of rgb(255, 213, 79). 1236 | *


1237 | */ 1238 | AMBER_300(255, 213, 79), 1239 | 1240 | /** 1241 | * The color AMBER 400 with an RGB value of rgb(255, 202, 40). 1242 | *


1243 | */ 1244 | AMBER_400(255, 202, 40), 1245 | 1246 | /** 1247 | * The color AMBER 500 with an RGB value of rgb(255, 193, 7). 1248 | *


1249 | */ 1250 | AMBER_500(255, 193, 7), 1251 | 1252 | /** 1253 | * The color AMBER 600 with an RGB value of rgb(255, 179, 0). 1254 | *


1255 | */ 1256 | AMBER_600(255, 179, 0), 1257 | 1258 | /** 1259 | * The color AMBER 700 with an RGB value of rgb(255, 160, 0). 1260 | *


1261 | */ 1262 | AMBER_700(255, 160, 0), 1263 | 1264 | /** 1265 | * The color AMBER 800 with an RGB value of rgb(255, 143, 0). 1266 | *


1267 | */ 1268 | AMBER_800(255, 143, 0), 1269 | 1270 | /** 1271 | * The color AMBER 900 with an RGB value of rgb(255, 111, 0). 1272 | *


1273 | */ 1274 | AMBER_900(255, 111, 0), 1275 | 1276 | /** 1277 | * The color AMBER A100 with an RGB value of rgb(255, 229, 127). 1278 | *


1279 | */ 1280 | AMBER_A100(255, 229, 127), 1281 | 1282 | /** 1283 | * The color AMBER A200 with an RGB value of rgb(255, 215, 64). 1284 | *


1285 | */ 1286 | AMBER_A200(255, 215, 64), 1287 | 1288 | /** 1289 | * The color AMBER A400 with an RGB value of rgb(255, 196, 0). 1290 | *


1291 | */ 1292 | AMBER_A400(255, 196, 0), 1293 | 1294 | /** 1295 | * The color AMBER A700 with an RGB value of rgb(255, 171, 0). 1296 | *


1297 | */ 1298 | AMBER_A700(255, 171, 0), 1299 | 1300 | // ORANGE 1301 | /** 1302 | * The color ORANGE with an RGB value of rgb(255, 152, 0). 1303 | *


1304 | */ 1305 | ORANGE(255, 152, 0), 1306 | 1307 | /** 1308 | * The color ORANGE 50 with an RGB value of rgb(255, 243, 224). 1309 | *


1310 | */ 1311 | ORANGE_50(255, 243, 224), 1312 | 1313 | /** 1314 | * The color ORANGE 100 with an RGB value of rgb(255, 224, 178). 1315 | *


1316 | */ 1317 | ORANGE_100(255, 224, 178), 1318 | 1319 | /** 1320 | * The color ORANGE 200 with an RGB value of rgb(255, 204, 128). 1321 | *


1322 | */ 1323 | ORANGE_200(255, 204, 128), 1324 | 1325 | /** 1326 | * The color ORANGE 300 with an RGB value of rgb(255, 183, 77). 1327 | *


1328 | */ 1329 | ORANGE_300(255, 183, 77), 1330 | 1331 | /** 1332 | * The color ORANGE 400 with an RGB value of rgb(255, 167, 38). 1333 | *


1334 | */ 1335 | ORANGE_400(255, 167, 38), 1336 | 1337 | /** 1338 | * The color ORANGE 500 with an RGB value of rgb(255, 152, 0). 1339 | *


1340 | */ 1341 | ORANGE_500(255, 152, 0), 1342 | 1343 | /** 1344 | * The color ORANGE 600 with an RGB value of rgb(251, 140, 0). 1345 | *


1346 | */ 1347 | ORANGE_600(251, 140, 0), 1348 | 1349 | /** 1350 | * The color ORANGE 700 with an RGB value of rgb(245, 124, 0). 1351 | *


1352 | */ 1353 | ORANGE_700(245, 124, 0), 1354 | 1355 | /** 1356 | * The color ORANGE 800 with an RGB value of rgb(239, 108, 0). 1357 | *


1358 | */ 1359 | ORANGE_800(239, 108, 0), 1360 | 1361 | /** 1362 | * The color ORANGE 900 with an RGB value of rgb(230, 81, 0). 1363 | *


1364 | */ 1365 | ORANGE_900(230, 81, 0), 1366 | 1367 | /** 1368 | * The color ORANGE A100 with an RGB value of rgb(255, 209, 128). 1369 | *


1370 | */ 1371 | ORANGE_A100(255, 209, 128), 1372 | 1373 | /** 1374 | * The color ORANGE A200 with an RGB value of rgb(255, 171, 64). 1375 | *


1376 | */ 1377 | ORANGE_A200(255, 171, 64), 1378 | 1379 | /** 1380 | * The color ORANGE A400 with an RGB value of rgb(255, 145, 0). 1381 | *


1382 | */ 1383 | ORANGE_A400(255, 145, 0), 1384 | 1385 | /** 1386 | * The color ORANGE A700 with an RGB value of rgb(255, 109, 0). 1387 | *


1388 | */ 1389 | ORANGE_A700(255, 109, 0), 1390 | 1391 | // DEEP_ORANGE 1392 | /** 1393 | * The color DEEP ORANGE with an RGB value of rgb(255, 87, 34). 1394 | *


1395 | */ 1396 | DEEP_ORANGE(255, 87, 34), 1397 | 1398 | /** 1399 | * The color DEEP ORANGE 50 with an RGB value of rgb(251, 233, 231). 1400 | *


1401 | */ 1402 | DEEP_ORANGE_50(251, 233, 231), 1403 | 1404 | /** 1405 | * The color DEEP ORANGE 100 with an RGB value of rgb(255, 204, 188). 1406 | *


1407 | */ 1408 | DEEP_ORANGE_100(255, 204, 188), 1409 | 1410 | /** 1411 | * The color DEEP ORANGE 200 with an RGB value of rgb(255, 171, 145). 1412 | *


1413 | */ 1414 | DEEP_ORANGE_200(255, 171, 145), 1415 | 1416 | /** 1417 | * The color DEEP ORANGE 300 with an RGB value of rgb(255, 138, 101). 1418 | *


1419 | */ 1420 | DEEP_ORANGE_300(255, 138, 101), 1421 | 1422 | /** 1423 | * The color DEEP ORANGE 400 with an RGB value of rgb(255, 112, 67). 1424 | *


1425 | */ 1426 | DEEP_ORANGE_400(255, 112, 67), 1427 | 1428 | /** 1429 | * The color DEEP ORANGE 500 with an RGB value of rgb(255, 87, 34). 1430 | *


1431 | */ 1432 | DEEP_ORANGE_500(255, 87, 34), 1433 | 1434 | /** 1435 | * The color DEEP ORANGE 600 with an RGB value of rgb(244, 81, 30). 1436 | *


1437 | */ 1438 | DEEP_ORANGE_600(244, 81, 30), 1439 | 1440 | /** 1441 | * The color DEEP ORANGE 700 with an RGB value of rgb(230, 74, 25). 1442 | *


1443 | */ 1444 | DEEP_ORANGE_700(230, 74, 25), 1445 | 1446 | /** 1447 | * The color DEEP ORANGE 800 with an RGB value of rgb(216, 67, 21). 1448 | *


1449 | */ 1450 | DEEP_ORANGE_800(216, 67, 21), 1451 | 1452 | /** 1453 | * The color DEEP ORANGE 900 with an RGB value of rgb(191, 54, 12). 1454 | *


1455 | */ 1456 | DEEP_ORANGE_900(191, 54, 12), 1457 | 1458 | /** 1459 | * The color DEEP ORANGE A100 with an RGB value of rgb(255, 158, 128). 1460 | *


1461 | */ 1462 | DEEP_ORANGE_A100(255, 158, 128), 1463 | 1464 | /** 1465 | * The color DEEP ORANGE A200 with an RGB value of rgb(255, 110, 64). 1466 | *


1467 | */ 1468 | DEEP_ORANGE_A200(255, 110, 64), 1469 | 1470 | /** 1471 | * The color DEEP ORANGE A400 with an RGB value of rgb(255, 61, 0). 1472 | *


1473 | */ 1474 | DEEP_ORANGE_A400(255, 61, 0), 1475 | 1476 | /** 1477 | * The color DEEP ORANGE A700 with an RGB value of rgb(221, 44, 0). 1478 | *


1479 | */ 1480 | DEEP_ORANGE_A700(221, 44, 0), 1481 | 1482 | // BROWN 1483 | /** 1484 | * The color BROWN with an RGB value of rgb(121, 85, 72). 1485 | *


1486 | */ 1487 | BROWN(121, 85, 72), 1488 | 1489 | /** 1490 | * The color BROWN 50 with an RGB value of rgb(239, 235, 233). 1491 | *


1492 | */ 1493 | BROWN_50(239, 235, 233), 1494 | 1495 | /** 1496 | * The color BROWN 100 with an RGB value of rgb(215, 204, 200). 1497 | *


1498 | */ 1499 | BROWN_100(215, 204, 200), 1500 | 1501 | /** 1502 | * The color BROWN 200 with an RGB value of rgb(188, 170, 164). 1503 | *


1504 | */ 1505 | BROWN_200(188, 170, 164), 1506 | 1507 | /** 1508 | * The color BROWN 300 with an RGB value of rgb(161, 136, 127). 1509 | *


1510 | */ 1511 | BROWN_300(161, 136, 127), 1512 | 1513 | /** 1514 | * The color BROWN 400 with an RGB value of rgb(141, 110, 99). 1515 | *


1516 | */ 1517 | BROWN_400(141, 110, 99), 1518 | 1519 | /** 1520 | * The color BROWN 500 with an RGB value of rgb(121, 85, 72). 1521 | *


1522 | */ 1523 | BROWN_500(121, 85, 72), 1524 | 1525 | /** 1526 | * The color BROWN 600 with an RGB value of rgb(109, 76, 65). 1527 | *


1528 | */ 1529 | BROWN_600(109, 76, 65), 1530 | 1531 | /** 1532 | * The color BROWN 700 with an RGB value of rgb(93, 64, 55). 1533 | *


1534 | */ 1535 | BROWN_700(93, 64, 55), 1536 | 1537 | /** 1538 | * The color BROWN 800 with an RGB value of rgb(78, 52, 46). 1539 | *


1540 | */ 1541 | BROWN_800(78, 52, 46), 1542 | 1543 | /** 1544 | * The color BROWN 900 with an RGB value of rgb(62, 39, 35). 1545 | *


1546 | */ 1547 | BROWN_900(62, 39, 35), 1548 | 1549 | // GREY 1550 | /** 1551 | * The color GREY with an RGB value of rgb(158, 158, 158). 1552 | *


1553 | */ 1554 | GREY(158, 158, 158), 1555 | 1556 | /** 1557 | * The color GREY 50 with an RGB value of rgb(250, 250, 250). 1558 | *


1559 | */ 1560 | GREY_50(250, 250, 250), 1561 | 1562 | /** 1563 | * The color GREY 100 with an RGB value of rgb(245, 245, 245). 1564 | *


1565 | */ 1566 | GREY_100(245, 245, 245), 1567 | 1568 | /** 1569 | * The color GREY 200 with an RGB value of rgb(238, 238, 238). 1570 | *


1571 | */ 1572 | GREY_200(238, 238, 238), 1573 | 1574 | /** 1575 | * The color GREY 300 with an RGB value of rgb(224, 224, 224). 1576 | *


1577 | */ 1578 | GREY_300(224, 224, 224), 1579 | 1580 | /** 1581 | * The color GREY 400 with an RGB value of rgb(189, 189, 189). 1582 | *


1583 | */ 1584 | GREY_400(189, 189, 189), 1585 | 1586 | /** 1587 | * The color GREY 500 with an RGB value of rgb(158, 158, 158). 1588 | *


1589 | */ 1590 | GREY_500(158, 158, 158), 1591 | 1592 | /** 1593 | * The color GREY 600 with an RGB value of rgb(117, 117, 117). 1594 | *


1595 | */ 1596 | GREY_600(117, 117, 117), 1597 | 1598 | /** 1599 | * The color GREY 700 with an RGB value of rgb(97, 97, 97). 1600 | *


1601 | */ 1602 | GREY_700(97, 97, 97), 1603 | 1604 | /** 1605 | * The color GREY 800 with an RGB value of rgb(66, 66, 66). 1606 | *


1607 | */ 1608 | GREY_800(66, 66, 66), 1609 | 1610 | /** 1611 | * The color GREY 900 with an RGB value of rgb(33, 33, 33). 1612 | *


1613 | */ 1614 | GREY_900(33, 33, 33), 1615 | 1616 | // BLUE GREY 1617 | /** 1618 | * The color BLUE GREY with an RGB value of rgb(96, 125, 139). 1619 | *


1620 | */ 1621 | BLUE_GREY(96, 125, 139), 1622 | 1623 | /** 1624 | * The color BLUE GREY 50 with an RGB value of rgb(236, 239, 241). 1625 | *


1626 | */ 1627 | BLUE_GREY_50(236, 239, 241), 1628 | 1629 | /** 1630 | * The color BLUE GREY 100 with an RGB value of rgb(207, 216, 220). 1631 | *


1632 | */ 1633 | BLUE_GREY_100(207, 216, 220), 1634 | 1635 | /** 1636 | * The color BLUE GREY 200 with an RGB value of rgb(176, 190, 197). 1637 | *


1638 | */ 1639 | BLUE_GREY_200(176, 190, 197), 1640 | 1641 | /** 1642 | * The color BLUE GREY 300 with an RGB value of rgb(144, 164, 174). 1643 | *


1644 | */ 1645 | BLUE_GREY_300(144, 164, 174), 1646 | 1647 | /** 1648 | * The color BLUE GREY 400 with an RGB value of rgb(120, 144, 156). 1649 | *


1650 | */ 1651 | BLUE_GREY_400(120, 144, 156), 1652 | 1653 | /** 1654 | * The color BLUE GREY 500 with an RGB value of rgb(96, 125, 139). 1655 | *


1656 | */ 1657 | BLUE_GREY_500(96, 125, 139), 1658 | 1659 | /** 1660 | * The color BLUE GREY 600 with an RGB value of rgb(84, 110, 122). 1661 | *


1662 | */ 1663 | BLUE_GREY_600(84, 110, 122), 1664 | 1665 | /** 1666 | * The color BLUE GREY 700 with an RGB value of rgb(69, 90, 100). 1667 | *


1668 | */ 1669 | BLUE_GREY_700(69, 90, 100), 1670 | 1671 | /** 1672 | * The color BLUE GREY 800 with an RGB value of rgb(55, 71, 79). 1673 | *


1674 | */ 1675 | BLUE_GREY_800(55, 71, 79), 1676 | 1677 | /** 1678 | * The color BLUE GREY 900 with an RGB value of rgb(38, 50, 56). 1679 | *


1680 | */ 1681 | BLUE_GREY_900(38, 50, 56); 1682 | 1683 | private final Color COLOR; 1684 | 1685 | MaterialDesign(final int RED, final int GREEN, final int BLUE) { 1686 | COLOR = Color.rgb(RED, GREEN, BLUE); 1687 | } 1688 | 1689 | @Override public Color get() { return COLOR; } 1690 | 1691 | @Override public String rgb() { return ColorHelper.rgb(COLOR); } 1692 | 1693 | @Override public String web() { return ColorHelper.web(COLOR); } 1694 | } 1695 | 1696 | -------------------------------------------------------------------------------- /src/main/java/eu/hansolo/colors/MaterialDesignColorPicker.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 by Gerrit Grunwald 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package eu.hansolo.colors; 18 | 19 | import javafx.application.Application; 20 | import javafx.geometry.Insets; 21 | import javafx.geometry.Pos; 22 | import javafx.scene.control.Label; 23 | import javafx.scene.control.Tooltip; 24 | import javafx.scene.input.Clipboard; 25 | import javafx.scene.input.ClipboardContent; 26 | import javafx.scene.layout.Background; 27 | import javafx.scene.layout.BackgroundFill; 28 | import javafx.scene.layout.ColumnConstraints; 29 | import javafx.scene.layout.CornerRadii; 30 | import javafx.scene.layout.GridPane; 31 | import javafx.scene.layout.RowConstraints; 32 | import javafx.scene.paint.Color; 33 | import javafx.scene.shape.Rectangle; 34 | import javafx.scene.text.Font; 35 | import javafx.stage.Stage; 36 | import javafx.scene.layout.StackPane; 37 | import javafx.scene.Scene; 38 | 39 | import java.util.regex.Matcher; 40 | import java.util.regex.Pattern; 41 | 42 | /** 43 | * User: hansolo 44 | * Date: 11.01.16 45 | * Time: 11:22 46 | */ 47 | public class MaterialDesignColorPicker extends Application { 48 | private static final Pattern PATTERN = Pattern.compile("(_[A]?[0-9]{2,3})"); 49 | private static final Matcher MATCHER = PATTERN.matcher(""); 50 | private static final int BOX_WIDTH = 70; 51 | private static final int BOX_HEIGHT = 50; 52 | private GridPane grid; 53 | 54 | @Override public void init() { 55 | grid = new GridPane(); 56 | 57 | Font font = Font.font(9); 58 | int col = 0; 59 | int row = 0; 60 | for (MaterialDesign color : MaterialDesign.values()) { 61 | String name = color.name().replace("_", " "); 62 | String strWeb = ColorHelper.web(color.get()); 63 | String strRgb = ColorHelper.rgb(color.get()); 64 | String text = String.join("", name, "\n", strWeb, "\n", strRgb); 65 | MATCHER.reset(color.name()); 66 | String brightness = ""; 67 | while (MATCHER.find()) { 68 | brightness = MATCHER.group(1).replace("_", " "); 69 | } 70 | 71 | Label label = new Label(color.name().replace("_", " ").replace(brightness, "") + "\n" + brightness); 72 | label.setFont(font); 73 | label.setAlignment(Pos.CENTER_LEFT); 74 | label.setTextFill(Color.WHITE); 75 | label.setMouseTransparent(true); 76 | 77 | StackPane box = new StackPane(label); 78 | box.setPrefSize(BOX_WIDTH, BOX_HEIGHT); 79 | box.setAlignment(Pos.BOTTOM_LEFT); 80 | box.setBackground(new Background(new BackgroundFill(color.get(), CornerRadii.EMPTY, Insets.EMPTY))); 81 | box.setOnMousePressed(event -> { 82 | box.setScaleX(0.9); 83 | box.setScaleY(0.9); 84 | String clipboardContent = new StringBuilder().append("Color.web(\"") 85 | .append(strWeb) 86 | .append("\");\n") 87 | .append("Color.") 88 | .append(strRgb) 89 | .append(";").toString(); 90 | 91 | Clipboard clipboard = Clipboard.getSystemClipboard(); 92 | ClipboardContent content = new ClipboardContent(); 93 | content.putString(clipboardContent); 94 | clipboard.setContent(content); 95 | }); 96 | box.setOnMouseReleased(event -> { 97 | box.setScaleX(1.0); 98 | box.setScaleY(1.0); 99 | }); 100 | 101 | Tooltip tooltip = new Tooltip(text); 102 | Tooltip.install(box, tooltip); 103 | grid.add(box, col, row); 104 | row++; 105 | if (col > 15) { 106 | if (row == 11) { 107 | row = 0; 108 | col++; 109 | } 110 | } else { 111 | if (row == 15) { 112 | row = 0; 113 | col++; 114 | } 115 | } 116 | } 117 | } 118 | 119 | @Override public void start(Stage stage) { 120 | StackPane pane = new StackPane(); 121 | pane.getChildren().addAll(grid); 122 | 123 | Scene scene = new Scene(pane); 124 | 125 | stage.setTitle("MaterialDesign Colors"); 126 | stage.setScene(scene); 127 | stage.show(); 128 | } 129 | 130 | @Override public void stop() { 131 | System.exit(0); 132 | } 133 | 134 | public static void main(String[] args) { 135 | launch(args); 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /src/main/java/eu/hansolo/colors/Metro.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 by Gerrit Grunwald 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package eu.hansolo.colors; 18 | 19 | import javafx.scene.paint.Color; 20 | 21 | 22 | /** 23 | * Created by hansolo on 11.01.16. 24 | */ 25 | public enum Metro implements IColor { 26 | 27 | /** 28 | * The color LIGHT GREEN with an RGB value of rgb(153,180,51). 29 | *


30 | */ 31 | LIGHT_GREEN(153,180,51), 32 | 33 | /** 34 | * The color GREEN with an RGB value of rgb(0,163,0). 35 | *


36 | */ 37 | GREEN(0,163,0), 38 | 39 | /** 40 | * The color DARK GREEN with an RGB value of rgb(30,113,69). 41 | *


42 | */ 43 | DARK_GREEN(30,113,69), 44 | 45 | /** 46 | * The color MAGENTA with an RGB value of rgb(255,0,151). 47 | *


48 | */ 49 | MAGENTA(255,0,151), 50 | 51 | /** 52 | * The color LIGHT PURPLE with an RGB value of rgb(159,0,167). 53 | *


54 | */ 55 | LIGHT_PURPLE(159,0,167), 56 | 57 | /** 58 | * The color PURPLE with an RGB value of rgb(126,56,120). 59 | *


60 | */ 61 | PURPLE(126,56,120), 62 | 63 | /** 64 | * The color DARK PURPLE with an RGB value of rgb(96,60,186). 65 | *


66 | */ 67 | DARK_PURPLE(96,60,186), 68 | 69 | /** 70 | * The color DARKEN with an RGB value of rgb(29,29,29). 71 | *


72 | */ 73 | DARKEN(29,29,29), 74 | 75 | /** 76 | * The color TEAL with an RGB value of rgb(0,171,169). 77 | *


78 | */ 79 | TEAL(0,171,169), 80 | 81 | /** 82 | * The color LIGHT BLUE with an RGB value of rgb(239,244,255). 83 | *


84 | */ 85 | LIGHT_BLUE(239,244,255), 86 | 87 | /** 88 | * The color BLUE with an RGB value of rgb(45,137,239). 89 | *


90 | */ 91 | BLUE(45,137,239), 92 | 93 | /** 94 | * The color DARK BLUE with an RGB value of rgb(43,87,151). 95 | *


96 | */ 97 | DARK_BLUE(43,87,151), 98 | 99 | /** 100 | * The color YELLOW with an RGB value of rgb(255,196,13). 101 | *


102 | */ 103 | YELLOW(255,196,13), 104 | 105 | /** 106 | * The color ORANGE with an RGB value of rgb(227,162,26). 107 | *


108 | */ 109 | ORANGE(227,162,26), 110 | 111 | /** 112 | * The color DARK ORANGE with an RGB value of rgb(218,83,44). 113 | *


114 | */ 115 | DARK_ORANGE(218,83,44), 116 | 117 | /** 118 | * The color RED with an RGB value of rgb(238,17,17). 119 | *


120 | */ 121 | RED(238,17,17), 122 | 123 | /** 124 | * The color DARK RED with an RGB value of rgb(185,29,71). 125 | *


126 | */ 127 | DARK_RED(185,29,71); 128 | 129 | private final Color COLOR; 130 | 131 | Metro(final int R, final int G, final int B) { 132 | COLOR = Color.rgb(R, G, B); 133 | } 134 | 135 | @Override public Color get() { return COLOR; } 136 | 137 | @Override public String rgb() { return ColorHelper.rgb(COLOR); } 138 | 139 | @Override public String web() { return ColorHelper.web(COLOR); } 140 | } 141 | -------------------------------------------------------------------------------- /src/main/java/eu/hansolo/colors/Social.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 by Gerrit Grunwald 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package eu.hansolo.colors; 18 | 19 | import javafx.scene.paint.Color; 20 | 21 | 22 | /** 23 | * Created by hansolo on 11.01.16. 24 | */ 25 | public enum Social implements IColor { 26 | 27 | /** 28 | * The color FACEBOOK with an RGB value of rgb(59,89,153). 29 | *


30 | */ 31 | FACEBOOK(59,89,153), 32 | 33 | /** 34 | * The color TWITTER with an RGB value of rgb(85,172,238). 35 | *


36 | */ 37 | TWITTER(85,172,238), 38 | 39 | /** 40 | * The color LINKED IN with an RGB value of rgb(0,119,181). 41 | *


42 | */ 43 | LINKED_IN(0,119,181), 44 | 45 | /** 46 | * The color TUMBLR with an RGB value of rgb(52,70,93). 47 | *


48 | */ 49 | TUMBLR(52,70,93), 50 | 51 | /** 52 | * The color YAHOO with an RGB value of rgb(65,0,147). 53 | *


54 | */ 55 | YAHOO(65,0,147), 56 | 57 | /** 58 | * The color INSTAGRAM with an RGB value of rgb(). 59 | *


60 | */ 61 | INSTAGRAM(63,114,155), 62 | 63 | /** 64 | * The color SKYPE with an RGB value of rgb(0,175,240). 65 | *


66 | */ 67 | SKYPE(0,175,240), 68 | 69 | /** 70 | * The color WORDPRESS with an RGB value of rgb(33,117,155). 71 | *


72 | */ 73 | WORDPRESS(33,117,155), 74 | 75 | /** 76 | * The color VIMEO with an RGB value of rgb(26,183,234). 77 | *


78 | */ 79 | VIMEO(26,183,234), 80 | 81 | /** 82 | * The color VK with an RGB value of rgb(76,117,163). 83 | *


84 | */ 85 | VK(76,117,163), 86 | 87 | /** 88 | * The color SLIDE_SHARE with an RGB value of rgb(0,119,181). 89 | *


90 | */ 91 | SLIDE_SHARE(0,119,181), 92 | 93 | /** 94 | * The color GOOGLE PLUS with an RGB value of rgb(220,78,65). 95 | *


96 | */ 97 | GOOGLE_PLUS(220,78,65), 98 | 99 | /** 100 | * The color PINTEREST with an RGB value of rgb(189,8,28). 101 | *


102 | */ 103 | PINTEREST(189,8,28), 104 | 105 | /** 106 | * The color YOUTUBE with an RGB value of rgb(229,45,39). 107 | *


108 | */ 109 | YOUTUBE(229,45,39), 110 | 111 | /** 112 | * The color STUMBLE UPON with an RGB value of rgb(235,73,36). 113 | *


114 | */ 115 | STUMBLE_UPON(235,73,36), 116 | 117 | /** 118 | * The color REDDIT with an RGB value of rgb(255,87,0). 119 | *


120 | */ 121 | REDDIT(255,87,0), 122 | 123 | /** 124 | * The color QUORA with an RGB value of rgb(185,43,39). 125 | *


126 | */ 127 | QUORA(185,43,39), 128 | 129 | /** 130 | * The color WEIBO with an RGB value of rgb(223,32,41). 131 | *


132 | */ 133 | WEIBO(223,32,41), 134 | 135 | /** 136 | * The color PRODUCT HUNT with an RGB value of rgb(218,85,47). 137 | *


138 | */ 139 | PRODUCT_HUNT(218,85,47), 140 | 141 | /** 142 | * The color HACKER NEWS with an RGB value of rgb(255,102,0). 143 | *


144 | */ 145 | HACKER_NEWS(255,102,0), 146 | 147 | /** 148 | * The color WHATS APP with an RGB value of rgb(37,211,102). 149 | *


150 | */ 151 | WHATS_APP(37,211,102), 152 | 153 | /** 154 | * The color WE CHAT with an RGB value of rgb(9,184,62). 155 | *


156 | */ 157 | WE_CHAT(9,184,62), 158 | 159 | /** 160 | * The color MEDIUM with an RGB value of rgb(2,184,117). 161 | *


162 | */ 163 | MEDIUM(2,184,117), 164 | 165 | /** 166 | * The color VINE with an RGB value of rgb(0,180,137). 167 | *


168 | */ 169 | VINE(0,180,137), 170 | 171 | /** 172 | * The color SLACK with an RGB value of rgb(58,175,133). 173 | *


174 | */ 175 | SLACK(58,175,133), 176 | 177 | /** 178 | * The color DRIBBLE with an RGB value of rgb(234,76,137). 179 | *


180 | */ 181 | DRIBBLE(234,76,137), 182 | 183 | /** 184 | * The color FLICKR with an RGB value of rgb(255,0,132). 185 | *


186 | */ 187 | FLICKR(255,0,132), 188 | 189 | /** 190 | * The color FOUR SQUARE with an RGB value of rgb(249,72,119). 191 | *


192 | */ 193 | FOUR_SQUARE(249,72,119), 194 | 195 | /** 196 | * The color BEHANCE with an RGB value of rgb(19,20,24). 197 | *


198 | */ 199 | BEHANCE(19,20,24), 200 | 201 | /** 202 | * The color SNAP CHAT with an RGB value of rgb(255,252,0). 203 | *


204 | */ 205 | SNAP_CHAT(255,252,0); 206 | 207 | private final Color COLOR; 208 | 209 | Social(final int R, final int G, final int B) { 210 | COLOR = Color.rgb(R, G, B); 211 | } 212 | 213 | @Override public Color get() { return COLOR; } 214 | 215 | @Override public String rgb() { return ColorHelper.rgb(COLOR); } 216 | 217 | @Override public String web() { return ColorHelper.web(COLOR); } 218 | } 219 | -------------------------------------------------------------------------------- /src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module eu.hansolo.colors { 2 | // Java 3 | requires java.base; 4 | 5 | // Java-FX 6 | requires transitive javafx.base; 7 | requires transitive javafx.graphics; 8 | requires transitive javafx.controls; 9 | 10 | exports eu.hansolo.colors; 11 | } --------------------------------------------------------------------------------