Skip to content
CAI
Software that uses CAICheck a score

cruisediary/Pastel

64.9

Adequate · 30 September 2026

944

lines of production code

Swift

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Pastel is a Swift library that provides animated gradient effects for iOS applications, supporting both UIKit and SwiftUI frameworks. It offers components such as PastelView, PastelImageView, and PastelText, along with view modifiers like pastelBackground, to apply customizable animated gradients to views, images, and text. The system manages animation states, timing curves, and predefined color palettes, ensuring smooth performance by preventing sublayer accumulation during repeated animations.

How it got here

2017 — Swift 5.0 migration and SPM adoption

8 changes.

The project underwent a major migration to Swift 5.0 and adopted Swift Package Manager as the primary distribution method, dropping support for older iOS versions. This period involved restructuring the codebase to support SwiftUI, updating the example app to use SPM, and establishing consistent build configurations and test coverage.

2018–2026 — SwiftUI support and SPM migration

6 changes.

The project expanded its capabilities by introducing native SwiftUI views and modifiers for animated gradients, alongside new UIKit components like PastelImageView and PastelLabel. This period also focused on architectural improvements, including restructuring the source layout for Swift Package Manager compatibility and implementing a shared animation state management system to enhance performance and consistency.

Features

Add SwiftUI views for animated gradient backgrounds, images, and text

Introduces a suite of SwiftUI components for iOS 16+ that apply animated gradient effects. Users can now use \pastelBackground\ view modifiers to add animated gradient backgrounds to any view, \PastelImage\ to tint images with animated gradients, and \PastelText\ to render text with animated gradient fills. These views are driven by \TimelineView\ for smooth animation and support custom timing curves, durations, and shared animation states.

Sources/Pastel/SwiftUI · high confidence

Example app updated with SwiftUI component demos and login UI

The example application now includes a SwiftUI-based DemoView that showcases Pastel components such as PastelGradientView, PastelText, and the .pastelBackground() modifier. Additionally, the main ViewController features a login interface with a PastelView animated background and a PastelImageView displaying the Instagram logo, providing users with practical examples of integrating Pastel into both UIKit and SwiftUI contexts.

Example/Example for Pastel · high confidence

New PastelImageView and PastelLabel components with improved animation engine

This update introduces two new UIKit components: PastelImageView, which applies a gradient mask to images, and PastelLabel, which applies gradients to text. The underlying PastelView animation engine has been refactored to use CAKeyframeAnimation instead of a CABasicAnimation chain, which prevents gradient sublayer accumulation when startAnimation is called repeatedly. Additionally, an optional PastelAnimationState can now be passed to PastelView to share animation settings across multiple views, and the addColor method is now the preferred way to modify the color sequence, deprecating the previous addcolor method.

Sources/Pastel/UIKit · high confidence

New animation state management and gradient configuration types

The library introduces a shared \PastelAnimationState\ class to coordinate animation configuration across UIKit and SwiftUI views, exposing properties for colors, duration, timing curves, repeat behavior, autoreverses, and gradient start/end points. It also adds \PastelTimingCurve\ and \RepeatBehavior\ enums to define easing and repetition logic, a \PastelGradient\ enum with 30 predefined color palettes, and a \PastelPoint\ enum with a public \point\ property to specify gradient anchors.

Sources/Pastel/Core · high confidence

Removals

Removed placeholder source file

The placeholder file \ReplaceMe.swift\ has been removed from the Pastel library. This cleanup eliminates an empty stub that was previously included in the source bundle, ensuring the library contains only functional code.

Pastel · high confidence

Architecture

Restructured project layout for Swift Package Manager compatibility

The Pastel source files have been reorganized into a Sources/Pastel directory structure, including the addition of an Info.plist and a Pastel.h header file. This restructuring prepares the framework for integration via Swift Package Manager (SPM) by establishing the standard module layout required for Swift package distribution.

Sources/Pastel · high confidence

Behavioural changes

Example app migrates from CocoaPods to Swift Package Manager

The Pastel example application has switched its dependency management from CocoaPods to Swift Package Manager. This change removes the CocoaPods scaffolding, including the \Pods\ group, podspec metadata, and associated build phases, while updating the Xcode project to reference the Pastel library directly via SPM. Additionally, the example now includes a \DemoView.swift\ component to demonstrate the library's usage.

Example/Pastel.xcodeproj · high confidence

Initialize Xcode workspace configuration

The project now includes a standard Xcode workspace setup, creating the workspace data file to reference the main project and adding the IDE workspace checks plist to suppress the 32-bit warning. This ensures the workspace is correctly recognized by Xcode and prevents unnecessary build warnings for users opening the project.

Pastel.xcodeproj/project.xcworkspace · high confidence

Project structure reorganized with SwiftUI support and test coverage

The Xcode project has been restructured to separate source files into Core, UIKit, and SwiftUI groups, introducing new SwiftUI components (PastelGradientModifier, PastelGradientView, PastelText, PastelTimingCurve+SwiftUI) alongside existing UIKit elements (PastelView, PastelLabel). Additionally, unit tests have been added for animation state, view behavior, gradients, and point mapping to improve test coverage.

Pastel.xcodeproj · high confidence

Swift 5.0 migration and SPM support

The library has been upgraded to Swift 5.0, as indicated by the new .swift-version file and Travis CI configuration updates. This change introduces compatibility with Swift Package Manager (SPM) alongside existing CocoaPods support, allowing users to integrate the library via SPM or Xcode's package manager. The CI environment has also been updated to use Xcode 10.2 and iOS 12 simulator for testing.

(repo-wide) · high confidence

Fixes

Added shared Xcode scheme for Pastel framework

A new shared Xcode scheme (Pastel.xcscheme) has been added to the project, configuring build, test, launch, profile, analyze, and archive actions for the Pastel framework and its associated tests. This ensures that all developers and CI systems use a consistent build configuration when working with the project.

Pastel.xcodeproj/xcshareddata · high confidence

Test coverage

Added unit tests for Pastel animation state, gradient presets, and view behavior; Test suite file reorganization and whitespace cleanup.

Dependencies

Pastel library updated to version 1.0.0 with Swift 5.9 and iOS 16 requirement

The Pastel library has been updated to version 1.0.0, introducing a significant shift in platform and language requirements. The package now requires Swift 5.9 and targets iOS 16.0 as the minimum deployment target, replacing the previous iOS 8.0 support. The source file structure has been reorganized to use a 'Sources/Pastel' directory, and the library is now distributed via Swift Package Manager (SPM) with a new Package.swift definition, while the CocoaPods Podspec has been updated to reflect these new constraints and the updated repository URL.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 67 → 65 (-2.3)
  • Rubric changed (rubric-2026.09.11 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (-0.2)
  • Architecture 100 → 100 (+0.0)
  • Maturity 54 → 54 (+0.0)
  • Readiness 55 → 51 (-3.6)
  • Security 100 → 100 (+0.0)

Resolved (1)

  • Off-boarding risk: anonymized user #1

New (7)

  • Coverage not measured — Swift suite
  • Dependency hygiene PARTLY measured — SwiftPM pinning read, dependency currency NOT established
  • Duplicate properties with ambiguous intent. 'startPoint'/'endPoint' and 'startPastelPoint'/'endPastelPoint' appear to serve the same purpose (defining gradient direction), but the distinction between 'Point' and 'PastelPoint' is unclear. 'PastelPoint' is a distinct type, but having both sets of properties on the same view suggests confusion about whether the view uses raw CGPoints or the custom PastelPoint type.
  • Duplicated block (13–14 lines × 2) (Sources/Pastel/SwiftUI/PastelImage.swift)
  • Off-boarding risk: anonymized user #1
  • Orphaned files with no living knowledge
  • Redundant and inconsistent naming for color manipulation. 'setColors' implies replacing the list, while 'addColor'/'addcolor' imply appending. Furthermore, 'addColor' and 'addcolor' are identical in functionality but differ only in casing, which is a clear inconsistency and likely a typo.

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

cruisediary/Pastel was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 30 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 0a95e19436e2138e1cac0267dd9afdd6da1f64a8 — the exact code this score is about.
  • Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-cb25ca4feafa.