Stay organized with collections
Save and categorize content based on your preferences.
ColorFilter
open class ColorFilter
A color filter can be used with a Paint
to modify the color of each pixel drawn with that paint. This is an abstract class that should never be used directly.
Summary
Public constructors
ColorFilter
ColorFilter()
Deprecated: Use subclass constructors directly instead.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-03-13 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-13 UTC."],[],[],null,["# ColorFilter\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nColorFilter\n===========\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/graphics/ColorFilter \"View this page in Java\") \n\n```\nopen class ColorFilter\n```\n\n|---|-----------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.graphics.ColorFilter](#) |\n\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [BlendModeColorFilter](/reference/kotlin/android/graphics/BlendModeColorFilter), [ColorMatrixColorFilter](/reference/kotlin/android/graphics/ColorMatrixColorFilter), [LightingColorFilter](/reference/kotlin/android/graphics/LightingColorFilter), [PorterDuffColorFilter](/reference/kotlin/android/graphics/PorterDuffColorFilter), [RuntimeColorFilter](/reference/kotlin/android/graphics/RuntimeColorFilter) |-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [BlendModeColorFilter](/reference/kotlin/android/graphics/BlendModeColorFilter) | A color filter that can be used to tint the source pixels using a single color and a specific [BlendMode](/reference/kotlin/android/graphics/BlendMode). | | [ColorMatrixColorFilter](/reference/kotlin/android/graphics/ColorMatrixColorFilter) | A color filter that transforms colors through a 4x5 color matrix. | | [LightingColorFilter](/reference/kotlin/android/graphics/LightingColorFilter) | A color filter that can be used to simulate simple lighting effects. | | [PorterDuffColorFilter](/reference/kotlin/android/graphics/PorterDuffColorFilter) | A color filter that can be used to tint the source pixels using a single color and a specific [Porter-Duff composite mode](/reference/kotlin/android/graphics/PorterDuff). | | [RuntimeColorFilter](/reference/kotlin/android/graphics/RuntimeColorFilter) | A [RuntimeColorFilter](/reference/kotlin/android/graphics/RuntimeColorFilter) calculates a per-pixel color based on the output of a user \\* defined Android Graphics Shading Language (AGSL) function. | |\n\nA color filter can be used with a [Paint](/reference/kotlin/android/graphics/Paint) to modify the color of each pixel drawn with that paint. This is an abstract class that should never be used directly.\n\nSummary\n-------\n\n| Public constructors ||\n|------------------------------------------|---|\n| [ColorFilter](#ColorFilter())`()` \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### ColorFilter\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nColorFilter()\n```\n\n**Deprecated:** *Use subclass constructors directly instead.*"]]