小编cna*_*liz的帖子

Android - 将 ARGB 颜色转换为 RGB

我正在尝试使用 alpha 获取颜色的 rgb 值,这意味着使用不同的红色、绿色和蓝色值使其完全不透明。

例如,

Color.argb(204, 40, 40, 40) // I have this color
Color.rgb(48, 48, 48) // I expect this value
Run Code Online (Sandbox Code Playgroud)

我试过将 argb 转换为 HEX,然后将 HEX 转换为 rgb,但不起作用。

java rgb android colors rgba

3
推荐指数
1
解决办法
3181
查看次数

将表格 HTML 转换为 JSON

我有这个:

<table>
    <tr>
        <th>Name:</th>
        <td>Carlos</td>
    </tr>        
    <tr>
        <th>Age:</th>
        <td>22</td>
    </tr>
</table>
Run Code Online (Sandbox Code Playgroud)

我需要一个 JSON 格式。

{"Name":"Carlos","Age": 22}
Run Code Online (Sandbox Code Playgroud)

我试过https://github.com/lightswitch05/table-to-json但它不适用于每一行的标题:(

编辑:http : //jsfiddle.net/Crw2C/773/

html javascript json html-table

2
推荐指数
2
解决办法
1万
查看次数

标签 统计

android ×1

colors ×1

html ×1

html-table ×1

java ×1

javascript ×1

json ×1

rgb ×1

rgba ×1