Code Monkey home page Code Monkey logo

kmpalette's People

Contributors

datl4g avatar jordond avatar mr3y-the-programmer avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

kmpalette's Issues

Expose `Swatch` object to the caller instead of the `Swatch#rgb`

I'm using androidx.palette in an app and I'm migrating to Kotlin multiplatform. I found this great library, it has everything I need except one small thing.

After generating dominant colors from an ImageBitmap, the API gives the user a way to filter & validate the dominant color by passing Swatch.rgb to isColorValid: (Color) -> Boolean lambda:

.firstOrNull { swatch -> isColorValid(Color(swatch.rgb)) }

but in my use case, I want to validate dominant colors based on Swatch.bodyTextColor:

Color(swatch.bodyTextColor).contrastAgainst(surfaceColor) >= MinContrastRatio // 3f

I think it is more appropriate to expose the Swatch object instead, and let the caller decide how to validate the color based on Swatch properties.

Web support

Seems like only web isn't supported as of yet. Any plans on supporting it?

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

cocoapods
demo/iosApp/Podfile
github-actions
.github/workflows/ci.yml
  • actions/checkout v4
  • actions/setup-java v4
  • gradle/wrapper-validation-action v3
  • gradle/gradle-build-action v3
  • gradle/gradle-build-action v3
  • actions/checkout v4
  • actions/setup-java v4
  • actions/cache v4
  • gradle/wrapper-validation-action v3
  • gradle/gradle-build-action v3
  • actions/checkout v4
  • actions/setup-java v4
  • gradle/wrapper-validation-action v3
  • reactivecircus/android-emulator-runner v2
  • actions/checkout v4
  • actions/setup-java v4
  • gradle/wrapper-validation-action v3
  • browser-actions/setup-chrome v1
.github/workflows/publish.yml
  • actions/checkout v4
  • actions/setup-java v4
  • actions/cache v4
  • gradle/wrapper-validation-action v3
  • EndBug/add-and-commit v9
  • actions/checkout v4
  • actions/setup-java v4
  • gradle/wrapper-validation-action v3
  • gradle/gradle-build-action v3
  • JamesIves/github-pages-deploy-action v4
  • actions/checkout v4
  • actions/setup-java v4
  • gradle/wrapper-validation-action v3
  • gradle/gradle-build-action v3
  • cloudflare/pages-action v1
gradle
gradle.properties
settings.gradle.kts
  • com.gradle.enterprise 3.17.4
build.gradle.kts
androidx-palette/build.gradle.kts
demo/composeApp/build.gradle.kts
extensions-base64/build.gradle.kts
extensions-bytearray/build.gradle.kts
extensions-file/build.gradle.kts
extensions-libres/build.gradle.kts
extensions-network/build.gradle.kts
gradle/libs.versions.toml
  • androidx.annotation:annotation 1.8.0
  • androidx.collection:collection 1.4.0
  • androidx.lifecycle:lifecycle-runtime-ktx 2.8.0
  • androidx.lifecycle:lifecycle-runtime-compose 2.8.0
  • androidx.appcompat:appcompat 1.6.1
  • androidx.activity:activity-compose 1.9.0
  • androidx.startup:startup-runtime 1.1.1
  • androidx.test:runner 1.5.2
  • androidx.test:rules 1.5.0
  • androidx.test.ext:junit-ktx 1.1.5
  • androidx.test.espresso:espresso-core 3.5.1
  • androidx.compose.ui:ui-tooling 1.6.7
  • co.touchlab:kermit 2.0.3
  • com.soywiz.korlibs.korim:korim 4.0.10
  • junit:junit 4.13.2
  • com.squareup.okio:okio 3.9.0
  • org.robolectric:robolectric 4.12.2
  • io.ktor:ktor-client-core 2.3.11
  • io.ktor:ktor-client-android 2.3.11
  • io.ktor:ktor-client-okhttp 2.3.11
  • io.ktor:ktor-client-darwin 2.3.11
  • io.ktor:ktor-client-js 2.3.11
  • io.github.skeptick.libres:libres-compose 1.2.2
  • com.materialkolor:material-kolor 1.5.1
  • cafe.adriel.voyager:voyager-navigator 1.0.0
  • com.mohamedrejeb.calf:calf-file-picker 0.4.0
  • media.kamel:kamel-image 0.9.4
  • org.jetbrains.kotlin.multiplatform 1.9.23
  • org.jetbrains.compose 1.6.2
  • org.jetbrains.kotlin.native.cocoapods 1.9.23
  • com.android.application 8.4.1
  • com.android.library 8.4.1
  • org.jetbrains.kotlin.android 1.9.23
  • io.github.skeptick.libres 1.2.2
  • com.github.ben-manes.versions 0.51.0
  • org.jetbrains.kotlinx.binary-compatibility-validator 0.14.0
  • org.jetbrains.dokka 1.9.20
  • com.vanniktech.maven.publish 0.28.0
  • org.jetbrains.kotlinx.kover 0.7.6
  • dev.drewhamilton.poko 0.15.3
kmpalette-bitmap-loader/build.gradle.kts
kmpalette-core/build.gradle.kts
test-utils/build.gradle.kts
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.7

  • Check this box to trigger a request for Renovate to run again on this repository

minSdkVersion cannot be smaller than version 24

Despite #21, the error still triggers with 2.0.0.

Caused by: java.lang.RuntimeException: Manifest merger failed : uses-sdk:minSdkVersion 21 cannot be smaller than version 24 declared in library [com.kmpalette:kmpalette-core-android-debug:2.0.0]

[Android] Duplicate class found

Happens on Android build, other targets working fine

Duplicate class androidx.palette.graphics.Palette found in modules androidx-palette-debug-runtime (com.kmpalette:androidx-palette-android-debug:2.1.0) and palette-1.0.0-runtime (androidx.palette:palette:1.0.0)
Duplicate class androidx.palette.graphics.Palette$Builder found in modules androidx-palette-debug-runtime (com.kmpalette:androidx-palette-android-debug:2.1.0) and palette-1.0.0-runtime (androidx.palette:palette:1.0.0)
Duplicate class androidx.palette.graphics.Palette$Filter found in modules androidx-palette-debug-runtime (com.kmpalette:androidx-palette-android-debug:2.1.0) and palette-1.0.0-runtime (androidx.palette:palette:1.0.0)
Duplicate class androidx.palette.graphics.Palette$Swatch found in modules androidx-palette-debug-runtime (com.kmpalette:androidx-palette-android-debug:2.1.0) and palette-1.0.0-runtime (androidx.palette:palette:1.0.0)
Duplicate class androidx.palette.graphics.Target found in modules androidx-palette-debug-runtime (com.kmpalette:androidx-palette-android-debug:2.1.0) and palette-1.0.0-runtime (androidx.palette:palette:1.0.0)
Duplicate class androidx.palette.graphics.Target$Builder found in modules androidx-palette-debug-runtime (com.kmpalette:androidx-palette-android-debug:2.1.0) and palette-1.0.0-runtime (androidx.palette:palette:1.0.0)

Duplicate classes found

Duplicate class androidx.annotation.ColorInt found in modules androidx-palette-debug-runtime (com.kmpalette:androidx-palette-android-debug:2.0.0) and annotation-jvm-1.7.0-rc01 (androidx.annotation:annotation-jvm:1.7.0-rc01)
Duplicate class androidx.annotation.FloatRange found in modules androidx-palette-debug-runtime (com.kmpalette:androidx-palette-android-debug:2.0.0) and annotation-jvm-1.7.0-rc01 (androidx.annotation:annotation-jvm:1.7.0-rc01)
Duplicate class androidx.annotation.IntRange found in modules androidx-palette-debug-runtime (com.kmpalette:androidx-palette-android-debug:2.0.0) and annotation-jvm-1.7.0-rc01 (androidx.annotation:annotation-jvm:1.7.0-rc01)

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.