Home > PCB_Net > getNetColor
PCB_Net.getNetColor() method
此 API 当前处于 BETA 预览状态,希望得到开发者的反馈。它的任何功能都可能在接下来的开发进程中被修改,请不要将它用于任何正式环境。
获取指定网络的颜色
签名
typescript
getNetColor(net: string): Promise<IPCB_NetInfo['color'] | undefined>;1
参数名
参数 | 类型 | 描述 |
|---|---|---|
net | string | 网络名称 |
返回值
Promise<IPCB_NetInfo['color'] | undefined>
网络颜色,undefined 为不存在该网络