Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for "Plus Darker" and "Plus Lighter" blend modes #5046

Open
iamcalledrob opened this issue Jun 28, 2024 · 1 comment
Open

Support for "Plus Darker" and "Plus Lighter" blend modes #5046

iamcalledrob opened this issue Jun 28, 2024 · 1 comment
Labels
common Affects all platforms enhancement New feature or request skiko

Comments

@iamcalledrob
Copy link

These two blend modes (Plus Darker, Plus Lighter) are very useful when building UI, in particular, for iOS -- yet they are missing in Compose Multiplatform.

The web now somewhat supports this kind of blending via css mix-blend-mode:

mix-blend-mode: plus-darker;
mix-blend-mode: plus-lighter;

Sidenote: I believe "Plus Darker" is also known as "Linear Burn"

Here's Figma's video showing the effect of this type of blending -- as you can see, this is necessary for building native looking UI for Apple platforms.

FigmaBlending.mp4

Alternatively, support for custom blend mode formulae might be even more versatile

More reading:

@iamcalledrob iamcalledrob added enhancement New feature or request submitted labels Jun 28, 2024
@iamcalledrob
Copy link
Author

I believe this may also be made possible via a shader if RuntimeEffect.makeForBlender() (skia: SkRuntimeEffect::makeBlender) was made available within Skiko -- it's conspicuously missing.

Skiko RuntimeEffect.kt
Skia SkRuntimeEffect::makeBlender

@kropp kropp added skiko common Affects all platforms and removed submitted labels Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Affects all platforms enhancement New feature or request skiko
Projects
None yet
Development

No branches or pull requests

2 participants