<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/adjust-the-intensity-of-colors-in-swiftui-views-rwpn3x8x7" -->

---
title: Adjust the intensity of colors in SwiftUI views | daily.dev
description: SwiftUI&#x27;s `brightness(_:)` modifier can be used to lighten or darken colors in views. Passing a positive value (up to 1) lightens a color toward white, while a...
canonical: https://daily.dev/posts/adjust-the-intensity-of-colors-in-swiftui-views-rwpn3x8x7
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Adjust the intensity of colors in SwiftUI views | daily.dev
og:description: SwiftUI&#x27;s `brightness(_:)` modifier can be used to lighten or darken colors in views. Passing a positive value (up to 1) lightens a color toward white, while a...
og:url: https://daily.dev/posts/adjust-the-intensity-of-colors-in-swiftui-views-rwpn3x8x7
og:image: https://api.daily.dev/og/posts/RwPN3X8x7.png
og:image:alt: Adjust the intensity of colors in SwiftUI views
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Adjust the intensity of colors in SwiftUI views

**[Nil Coalescing](https://daily.dev/sources/nilcoalescing)** · 1 min read · 0 upvotes · 0 comments

## Summary

SwiftUI's `brightness(_:)` modifier can be used to lighten or darken colors in views. Passing a positive value (up to 1) lightens a color toward white, while a negative value (down to -1) darkens it toward black. A simple ForEach loop demonstrates creating gradient-like color progressions using this modifier on a base color like purple.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://nilcoalescing.com/blog/AdjustTheIntensityOfColorsInSwiftUIViews>

---

Tags: [#ios](https://daily.dev/tags/ios), [#swift](https://daily.dev/tags/swift), [#swiftui](https://daily.dev/tags/swiftui)

[View this post on daily.dev](https://daily.dev/posts/adjust-the-intensity-of-colors-in-swiftui-views-rwpn3x8x7)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Adjust the intensity of colors in SwiftUI views","url":"https://daily.dev/posts/adjust-the-intensity-of-colors-in-swiftui-views-rwpn3x8x7","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/adjust-the-intensity-of-colors-in-swiftui-views-rwpn3x8x7"},"datePublished":"2026-08-02T07:15:04.405Z","dateModified":"2026-08-02T07:31:09.087Z","description":"SwiftUI's `brightness(_:)` modifier can be used to lighten or darken colors in views. Passing a positive value (up to 1) lightens a color toward white, while a...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/1b57ae956df6a04f9159549e2d3d3f63?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/1b57ae956df6a04f9159549e2d3d3f63?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Nil Coalescing","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Nil Coalescing","logo":"https://media.daily.dev/image/upload/s--rcEu6sag--/f_auto,q_auto/v1785654899/logos/nilcoalescing?_a=BAMAMicg0","url":"https://daily.dev/sources/nilcoalescing"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/adjust-the-intensity-of-colors-in-swiftui-views-rwpn3x8x7","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ios,swift,swiftui","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Nil Coalescing","item":"https://daily.dev/sources/nilcoalescing"},{"@type":"ListItem","position":3,"name":"Adjust the intensity of colors in SwiftUI views"}]}
```

