导航栏的 .isTranslucent 颜色的 rgb 等效颜色是什么?

What are the rgb equivalent colors to the navigation bar's .isTranslucent color?

导航栏有一个 .isTranslucent 属性 赋予它灰色背景颜色

navigationController?.navigationBar.isTranslucent = true

我希望我的整个视图控制器完全匹配相同的颜色,.lightGray 不是吗。我尝试使用视图控制器的视图的 .alpha.isOpaque 属性,但我无法使其匹配。

有谁知道 rgb 颜色或其他方法可以让我的视图控制器的视图背景颜色与相同的半透明灰色相匹配?

override func viewDidLoad() {
    super.viewDidLoad()

    // I tried playing with different combinations of all of these in different ways

    view.backgroundColor = .lightGray

    view.alpha = .5

    view.isOpaque = false
} 

这会将视图和导航栏设置为相同的颜色:

view.backgroundColor = UIColor(red   : 249.0/255.0,
                               green : 249.0/255.0,
                               blue  : 249.0/255.0,
                               alpha : 1.0)

接缝还会在那里。如果您想删除它:

navigationController?.navigationBar.shadowImage = UIImage()