React-native学习-7-颜色

//7.颜色:

// RGB: rgb() 和 rgba() 两种十六进制与函数方法

// '#f0f' (#rgb)

// '#ff00ff' (#rrggbb)

// 'rgb(255, 0, 255)'

// 'rgba(255, 255, 255, 1.0)'  

// 色调-饱和度-亮度 (HSL):也支持 hsl() 和 hsla() 函数方法  :'hsl(360, 100%, 100%)'     'hsla(360, 100%, 100%, 1.0)'

import React, { useState } from 'react';

import { View, Text, Image } from 'react-native';


 

const ColorDemo = () => {

    return (

        <View>

            <Text style={{color:'#f0f'}}>hello</Text>

            <Text style={{color:'#ffff00'}}>hello1</Text>

            <Text style={{color:'#rgb(0, 0, 255)'}}>hello2</Text>

            <Text style={{color:'#rgba(255, 0, 0, 1.0)'}}>hello3</Text>

            <Text style={{color:'#hsl(360, 100%, 50%)'}}>hello4</Text>

            <Text style={{color:'hsla(360, 50%, 50%, 1.0)'}}>hello5</Text>

        </View>

    );

}

 

export default ColorDemo;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值