mirror of
https://github.com/material-components/material-components-ios.git
synced 2026-02-20 08:27:32 +08:00
Our creativity knows no bounds. ### Find ``` /\* *Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\. * *Licensed under the Apache License,? Version 2\.0 \(the "License"\); *you may not use this file except in compliance with the License\. *You may obtain a copy of the License at * *http://www\.apache\.org/licenses/LICENSE-2\.0 * *Unless required by applicable law or agreed to in writing,? software *distributed under the License is distributed on an "AS IS" BASIS,? *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,? either express or implied\. *See the License for the specific language governing permissions and *limitations under the License\. *\*/ ``` ``` /\* *Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\. *Licensed under the Apache License, Version 2\.0 \(the "License"\); *you may not use this file except in compliance with the License\. *You may obtain a copy of the License at *http://www\.apache\.org/licenses/LICENSE-2\.0 *Unless required by applicable law or agreed to in writing, software *distributed under the License is distributed on an "AS IS" BASIS, *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\. *See the License for the specific language governing permissions and *limitations under the License\. *\*/ ``` ``` /\* *Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\. * *Licensed under the Apache License, Version 2\.0 \(the "License"\); *you may not use this file except in compliance with the License\. *You may obtain a copy of the License at * *http://www\.apache\.org/licenses/LICENSE-2\.0 * *Unless required by applicable law or agreed to in writing, software *distributed under the License is distributed on an "AS IS" BASIS, *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\. *See the License for the specific language governing permissions and *limitations under the License\. *\*/ ``` ``` /\* *Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\. * *Licensed under the Apache License, Version 2\.0 \(the "License"\); *you may not use this file except in compliance with the License\. *You may obtain a copy of the License at * *http://www\.apache\.org/licenses/LICENSE-2\.0 * *Unless required by applicable law or agreed to in writing, software *distributed under the License is distributed on an "AS IS" BASIS, *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\. *See the License for the specific language governing permissions and *limitations under the License\. *\*/ ``` ``` /\* Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\. Licensed under the Apache License, Version 2\.0 \(the "License"\); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE-2\.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\. See the License for the specific language governing permissions and limitations under the License\. \*/ ``` ``` /\* Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\. +Licensed under the Apache License, Version 2\.0 \(the "License"\); +you may not use this file except in compliance with the License\. +You may obtain a copy of the License at +http://www\.apache\.org/licenses/LICENSE-2\.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\. +See the License for the specific language governing permissions and +limitations under the License\. *\*/ ``` ``` /\* Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\. +Licensed under the Apache License, Version 2\.0 \(the "License"\); +you may not use this file except in compliance with the License\. +You may obtain a copy of the License at +http://www\.apache\.org/licenses/LICENSE-2\.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\. +See the License for the specific language governing permissions and +limitations under the License\. *\*/ ``` ``` /\* Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\. Licensed under the Apache License, Version 2\.0 \(the "License"\) you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE-2\.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\. See the License for the specific language governing permissions and limitations under the License\. \*/ ``` ``` /\* Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\. Licensed under the Apache License, Version 2\.0 \(the "License"\); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE-2\.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\. See the License for the specific language governing permissions and limitations under the License\. \*/ ``` ``` /\* Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\. Licensed under the Apache License, Version 2\.0 \(the "License"\); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE-2\.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\. See the License for the specific language governing permissions and limitations under the License\. \*/ ``` ### Replace ``` // Copyright $1-present the Material Components for iOS authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. ```
Palettes
The Palettes component provides Material colors organized into similar palettes.
Design & API Documentation
Installation
Installation with CocoaPods
To add this component to your Xcode project using CocoaPods, add the following to your Podfile:
pod 'MaterialComponents/Palettes'
Then, run the following command:
pod install
Usage
Importing
Before using Palettes, you'll need to import it:
Swift
import MaterialComponents.MaterialPalettes
Objective-C
#import "MaterialPalettes.h"
Using palettes
Much like UIColor objects, MDCPalette objects are immutable static objects you can use to obtain Material colors. All palettes have a set of tints with lower numbers being lighter colors and higher numbers being darker colors. The 500 tint is the most common representative color for its respective palette. Most palettes (but not all) also have a set of accent colors following a similar naming scheme.
Examples
Swift
view.backgroundColor = MDCPalette.green.tint500
Objective-C
self.view.backgroundColor = MDCPalette.greenPalette.tint500;