https://github.com/chrynan/colors

Kotlin Multiplatform Colors

https://github.com/chrynan/colors

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.7%) to scientific vocabulary

Keywords

color colors graphics kotlin kotlin-library kotlin-multi-platform kotlin-multiplatform multiplatform ui

Keywords from Contributors

parcel
Last synced: 5 months ago · JSON representation

Repository

Kotlin Multiplatform Colors

Basic Info
  • Host: GitHub
  • Owner: chRyNaN
  • License: apache-2.0
  • Language: Kotlin
  • Default Branch: master
  • Homepage:
  • Size: 11.9 MB
Statistics
  • Stars: 10
  • Watchers: 0
  • Forks: 1
  • Open Issues: 0
  • Releases: 19
Topics
color colors graphics kotlin kotlin-library kotlin-multi-platform kotlin-multiplatform multiplatform ui
Created almost 7 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

colors

Kotlin Multi-platform Color Support. This allows using Colors in multi-platform code. Compatible with Jetpack Compose/Multi-platform. Serialization and Palette Generation Support.
GitHub tag (latest by date)

```kotlin val white = Color("#FFFFFF") val black = Color(red = 0, green = 0, blue = 0)

println("White: colorLong = ${white.colorLong}; cssValue = ${white.cssValue}") println("Black: colorLong = ${black.colorLong}; cssValue = ${black.cssValue}") ```

Usage

To obtain a Color instance, use one of the constructor functions:

```kotlin Color("#FFFFFF")

Color(255, 255, 255, 255)

Color(0xFFFFFFFF)

// Or to obtain a specific Color type, like RgbaColor RgbaColor(255, 255, 255, 255) ```

Using properties from the Color interface:

```kotlin // sRGB Color Int color.colorInt

// Color components and ColorSpace encoded into a Long color.colorLong

// CSS Value color.cssValue

// ColorSpace color.colorSpace

// Alpha value color.alpha

// Specific Color components color.component1()

// All Color Components - Example for an RGBA Color val (red, green, blue, alpha) = color

// Color Components as a FloatArray color.components ```

Building the library

The library is provided through Repsy.io. Checkout the releases page to get the latest version.
GitHub tag (latest by date)

Repository

kotlin repositories { maven { url = uri("https://repo.repsy.io/mvn/chrynan/public") } }

Dependencies

Core:

kotlin implementation("com.chrynan.colors:colors-core:$VERSION")

Extensions:

kotlin implementation("com.chrynan.colors:colors-extension:$VERSION")

Theme:

kotlin implementation("com.chrynan.colors:colors-theme:$VERSION")

Palette:

kotlin implementation("com.chrynan.colors:colors-palette:$VERSION")

Compose Multiplatform:**

kotlin implementation("com.chrynan.colors:colors-compose:$VERSION")

Compose HTML:

kotlin implementation("com.chrynan.colors:colors-compose-web:$VERSION")

Documentation

More detailed documentation is available in the docs folder. The entry point to the documentation can be found here.

Sample

Checkout the Android Sample Project for an example of using the library.

License

``` Copyright 2021 chRyNaN

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ```

Owner

  • Name: Christopher
  • Login: chRyNaN
  • Kind: user
  • Location: Austin, TX
  • Company: Starry

GitHub Events

Total
Last Year

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 238
  • Total Committers: 3
  • Avg Commits per committer: 79.333
  • Development Distribution Score (DDS): 0.059
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Chris c****n@s****m 224
Chris Keenan 1****N 13
David Cushman d****n@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 7 months ago


Dependencies

colors-core/build.gradle.kts maven
  • androidx.annotation:annotation 1.5.0 implementation
  • org.jetbrains.kotlin:kotlin-stdlib-common * implementation
colors-extension/build.gradle.kts maven
  • org.jetbrains.kotlin:kotlin-stdlib-common * implementation
colors-palette/build.gradle.kts maven
  • org.jetbrains.kotlin:kotlin-stdlib-common * implementation
colors-theme/build.gradle.kts maven
  • org.jetbrains.kotlin:kotlin-stdlib-common * implementation
sample-android/build.gradle.kts maven
  • androidx.activity:activity-compose 1.6.0 implementation
  • androidx.appcompat:appcompat 1.5.1 implementation
  • androidx.compose.compiler:compiler 1.3.2 implementation
  • androidx.compose.material:material-icons-extended 1.3.0-beta03 implementation
  • androidx.compose.ui:ui-tooling 1.3.0-beta03 implementation
  • androidx.core:core-ktx 1.9.0 implementation
  • com.chrynan.navigation:navigation-compose 0.5.0 implementation
  • com.chrynan.presentation:presentation-compose 0.8.0 implementation
  • com.chrynan.ui-components:ui-components-image 0.1.7 implementation
  • com.google.android.material:material 1.6.1 implementation
.github/workflows/refresh_versions.yml actions
  • EndBug/add-and-commit v9 composite
  • actions/checkout v3 composite
  • actions/setup-java v3 composite
  • gradle/gradle-build-action v2 composite
  • peterjgrainger/action-create-branch v2.2.0 composite
  • repo-sync/pull-request v2 composite
build.gradle.kts maven
.github/workflows/gradle_wrapper_validation.yml actions
  • actions/checkout v3 composite
  • gradle/wrapper-validation-action v1 composite
.github/workflows/greetings.yml actions
  • actions/first-interaction v1 composite
.github/workflows/publish.yml actions
  • actions/checkout v3 composite
  • actions/setup-java v3 composite
buildSrc/build.gradle.kts maven
colors-compose/build.gradle.kts maven
colors-compose-web/build.gradle.kts maven