---
title: "Discussion on \"Take Control of Linear gradient with positions array\" | Hashnode"
description: "Discussion on \"Take Control of Linear gradient with positions array\". Applying gradient through XML, has a limitation on number of colors to three, and the position of colors like startColor,centerColor and endColor, whereas with LinearGradient object applied to a shader for Paint in a canvas, we can overcome them.\nLet..."
url: "https://hashnode.com/posts/control-linear-gradient-positions/61ec5b585fbc177f9f3b57d2"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Take Control of Linear gradient with positions array](https://kotlinlang.dev/control-linear-gradient-positions?utm_source=hashnode&utm_medium=feed)

Applying gradient through XML, has a limitation on number of colors to three, and the position of colors like startColor,centerColor and endColor, whereas with LinearGradient object applied to a shader for Paint in a canvas, we can overcome them. Let...

Jan 22, 2022 · 4 min read · kotlinlang.dev  
Read the article

-   [#android](https://hashnode.com/tag/android)
-   [#android-app-development](https://hashnode.com/tag/android-app-development)

## Written by

[Tejaswi B](https://hashnode.com/@tejaswi)

@tejaswi · Hyderabad, IN

  
[View profile](https://hashnode.com/@tejaswi)

Writes code for living

Professional android developer since 7+ years. https://www.linkedin.com/in/tejaswib91/

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
