Swiftpack.co - swift-man/MaterialDesignColor as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by swift-man.
swift-man/MaterialDesignColor 1.0.2
SwiftUI-Color
⭐️ 1
πŸ•“ 2 weeks ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/swift-man/MaterialDesignColor.git", from: "1.0.2")

Material Design Colors by Google

SwiftUI-Version

Badge Badge Badge - Version Badge - Swift Package Manager Badge - Platform Badge - Platform Badge - Platform Badge - Platform Badge - License


Video Label

머티리얼 λ””μžμΈμ—μ„œ μ œκ³΅ν•˜λŠ” 색상 νŒ”λ ˆνŠΈκ°€ μžˆλ‹€. 컬러 툴 μ‚¬μ΄νŠΈλ₯Ό μ‚¬μš©ν•˜λ©΄ UI의 메인 컬러둜 μ •ν•΄μ‘Œμ„ λ•Œμ˜ 전체적인 색 λŠλ‚Œμ„ λ³Ό 수 μžˆλ‹€. μ‚¬μ΄νŠΈμ—μ„œ νŒ”λ ˆνŠΈμ— μžˆλŠ” 정해진 색 말고도 μ»€μŠ€ν…€ μƒ‰μœΌλ‘œ κ³ λ₯Ό 수 있긴 ν•˜λ‹€.

μœ„μ˜ μ†Œκ°œ μ˜μƒμ— λ‚˜μ˜€λ“― 이 세상에 잘λͺ»λœ 색은 μ—†λ‹€. 단지 μš°λ¦¬κ°€ κ³ λ₯Ό 수 μžˆλŠ” μƒ‰μ˜ μŠ€νŽ™νŠΈλŸΌμ€ λ„ˆλ¬΄ 많기 λ•Œλ¬Έμ— 그쀑에 전문가듀이 κ²€μ¦ν•˜μ—¬ μ‚¬μš©ν•˜κΈ° μ’‹κ²Œ λ§Œλ“€μ–΄μ§„ νŒ”λ ˆνŠΈ 쀑 ν•˜λ‚˜κ°€ 이 머티리얼 컬러 νŒ”λ ˆνŠΈμΌ 뿐이닀. 즉 여기에 μžˆλŠ” 색을 μ‚¬μš©ν•˜λŠ” 게 λ‹€λ₯Έ 색듀 보닀 무쑰건 효과적이라고 μƒκ°ν•˜κΈ° λ³΄λ‹€λŠ”, UI에 μ‚¬μš©ν•˜κΈ° 쒋도둝 밝기λ₯Ό μ²΄κ³„μ μœΌλ‘œ λ‚˜λˆ„μ–΄ 놓은 쒋은 견본이라고 보면 λœλ‹€. λ”°λΌμ„œ μžμ‹ μ˜ UI 컨셉에 νŠΉλ³„νžˆ μ •ν™•ν•œ 색상값이 정해진 게 μ•„λ‹ˆλΌλ©΄ 이 νŒ”λ ˆνŠΈμ— μžˆλŠ” 색을 μ‚¬μš©ν•˜λ©΄ μ’€ 더 μ‰½κ²Œ 효과적으둜 λ§Œλ“€ 수 μžˆλ‹€.

μ•„λž˜λŠ” 머티리얼 λ””μžμΈμ—μ„œ μ‚¬μš©ν•˜λŠ” 색 νŒ”λ ˆνŠΈλ₯Ό ν‘œλ‘œ λ‚˜νƒ€λ‚Έ 것이닀. μƒ‰μ˜ 배경에 따라 글씨색이 검은색(#000)κ³Ό 흰색(#FFF)으둜 λ‹€λ₯Έλ°, μ €μ‹œλ ₯자λ₯Ό μœ„ν•œ μ΅œμ†Œ λŒ€λΉ„μ— λ§žλ„λ‘ 머티리얼 λ””μžμΈμ—μ„œ ꢌμž₯ν•˜λŠ” 글씨 μƒ‰μœΌλ‘œ λ‚˜λ¬΄μœ„ν‚€μ—μ„œ ν‘œλ₯Ό λ§Œλ“€ λ•Œ 참고해도 도움이 λœλ‹€. 색에 λ”°λ₯Έ μ •ν™•ν•œ νŒλ…μ„±(legibility)을 ν™•μΈν•˜κ³  μ‹Άλ‹€λ©΄, μœ„μ˜ 컬러 툴 μ‚¬μ΄νŠΈμ—μ„œ 상단 Accessibility 탭에 λ“€μ–΄κ°€λ©΄ μ„ νƒν•œ 색을 배경으둜 μ‚¬μš©ν–ˆμ„λ•Œ 각쒅 ν…μŠ€νŠΈμ˜ νŒλ…μ„±μ— κ΄€ν•œ λ‹€μ–‘ν•œ 정보λ₯Ό λ³Ό 수 μžˆλ‹€.

색 이름은 λ§¨μœ„μ˜ μ˜μ–΄ 이름과 숫자λ₯Ό ν•©μ³μ„œ μ½λŠ”λ‹€. 예λ₯Όλ“€μ–΄ Blue 300은 #64B5F6이닀. 쀑심이 λ˜λŠ” 색 500을 기점으둜 10κ°€μ§€μ˜ 밝기둜 λ‚˜λˆ„μ–΄μ Έ μžˆλ‹€. μΆ”κ°€λ‘œ 숫자 μ•žμ— Aκ°€ 뢙은 4가지 색은 채도가 λ†’μ•„ λˆˆμ— κ°€μž₯ λ¨Όμ € λ“€μ–΄μ˜€λŠ” μƒ‰μœΌλ‘œ, 행동을 μœ λ„ν•˜κΈ° μœ„ν•œ 메인 μ•‘μ…˜ λ²„νŠΌμ— μ‚¬μš©ν•˜κΈ° μ’‹λ‹€.

Example 1

import MaterialDesignColor

let color: Color = .pink400

Example 2

import MaterialDesignColor

Text("title")
  .foregroundColor(.tealA700)

Installation

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler.

Once you have your Swift package set up, adding Alamofire as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/swift-man/MaterialDesignColor.git", from: "1.0.2")
]

Xcode Preview

Open file in Xcode MaterialDesignPreview.swift or /assets/6.png

Image

Material palette Color Tool

GitHub

link
Stars: 1
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Related Packages

Release Notes

2 weeks ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics