GithubHelp home page GithubHelp logo

chrynan / colors Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 0.0 12.18 MB

Kotlin Multiplatform Colors

License: Apache License 2.0

Kotlin 100.00%
color colors graphics kotlin kotlin-library kotlin-multi-platform kotlin-multiplatform multiplatform ui

colors's Introduction

chRyNaN

Chris Keenan

Professional software engineer. Kotlin and clean code enthusiast. Active open source contributor for the Kotlin multi-platform ecosystem. Senior Android Engineer at @StarryInternet.


Open Source Projects

  • inject - Inject annotations for common code.
  • serialization-parcelable - Android Parcelable support for kotlinx.serialization.
  • krypt - Kotlin multi-platform cryptographic utility library.
  • kapi - Server-side API development with Ktor.
  • cycle - App presentation layer design pattern.
  • navigation - App navigation library.
  • time - Kotlin Duration and kotlinx.datetime companion library.
  • paginate - Kotlin Pagination Library.
  • dispatchers - Simple wrapper around the Kotlin Coroutine Dispatchers object for common usecases.
  • validator - Simple and flexible validation library.
  • colors - Color representation for common code.
  • emoji - Emoji usage and UI support library.
  • logger - Kotlin Multi-platform logging utility.
  • uri - Kotlin Mutli-platform URI objects and validation.

Featured articles

Badge Badge Badge Badge Badge Badge
Kotlin Weekly Issue #182


Help support my Kotlin multi-platform open source work!

Buy Me A Coffee

colors's People

Contributors

chrynan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

colors's Issues

Compile to Native

Is your feature request related to a problem? Please describe.
Yes, I would like to use this library - but it is simply unavailable on Native.
image

Describe the solution you'd like
Compile colors to Kotlin Native.

Describe alternatives you've considered
I would create my own library.

Additional context
Your GitHub issue form is broken.

lerp utility function throwing unexpected exception

Describe the bug
lerp function throws an exception IllegalArgumentException. This is a result of the lerp function converting to the LAB colorspace, and then attempting to convert to back to sRBG color space. See stack below:

Caused by: java.lang.IllegalArgumentException: RgbaColor needs to have a ColorModel of RGB
        at com.chrynan.colors.BaseRgbaColor.<init>(BaseRgbaColor.kt:13)
        at com.chrynan.colors.BaseRgbaColor.<init>(Unknown Source:0)
        at com.chrynan.colors.ColorConstructorUtilsKt.RgbaColor(ColorConstructorUtils.kt:245)
        at com.chrynan.colors.ColorUtilsKt.lerp(ColorUtils.kt:103)

To Reproduce
Steps to reproduce the behavior:

  • Invoke this function
fun test(color: Long): Color {
   return lerp(Color(color), Color.White, 50.0)
}

Expected behavior
Return the linear interpolated color

Additional context
Utilizing in KMM project

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.