skiptools / skiptools/skip-ui

Color with a #colorLiteral()

Open
#100 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
330
Forks
76
Avg merge
3h 6m
Merged PRs (30d)
1

Description

Goal

Create a Color with a #colorLiteral()

Description

I'm trying to get a SwiftUI Color with #colorLiteral() but Color(uiColor:) is not implemented. An alternative would be to create the Color with the red, blue, green and opacity vars from UIColor but they can't be accessed

Solution

Mark UIColor variables as public in SkipUI.
The class and init declarations are public, except the variables

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test path is named in the issue. Start by locating the UIColor declarations in SkipUI and inspect the existing public class and initializer; done means the color component variables are publicly accessible so a #colorLiteral() can be used to create a Color.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.